diff --git a/src/app/lsp.ts b/src/app/lsp.ts index 50a98e3..a80a978 100644 --- a/src/app/lsp.ts +++ b/src/app/lsp.ts @@ -6,6 +6,7 @@ import { EditorView } from "@codemirror/view"; import { LSPClient, + LSPPlugin, languageServerExtensions, Workspace, } from "@codemirror/lsp-client"; @@ -107,6 +108,12 @@ class OpenFileWorkspace extends Workspace { file.version = this.nextFileVersion(file.uri); file.changes = ChangeSet.empty(file.doc.length); } + for(const e of file.editors) { + const plugin = LSPPlugin.get(e.view); + if(plugin) { + plugin.clear(); + } + } } return result; }