MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / detachLspForFile

Function detachLspForFile

src/lib/editorManager.js:756–769  ·  view source on GitHub ↗
(file)

Source from the content-addressed store, hash-verified

754 }
755
756 function detachLspForFile(file) {
757 if (!file || file.type !== "editor") return;
758 const uri = getFileLspUri(file);
759 if (!uri) return;
760 try {
761 lspClientManager.detach(uri);
762 } catch (error) {
763 console.warn(`Failed to detach LSP client for ${uri}`, error);
764 }
765 if (uri === lastLspUri && manager.activeFile?.id === file.id) {
766 lastLspUri = null;
767 editor.dispatch({ effects: lspCompartment.reconfigure([]) });
768 }
769 }
770
771 // Plugin already wires CSS completions; attach extras for related syntaxes.
772 const emmetCompletionSyntaxes = new Set([

Callers 1

EditorManagerFunction · 0.85

Calls 2

getFileLspUriFunction · 0.85
detachMethod · 0.80

Tested by

no test coverage detected