From 0e70335791a671ebb8041165f7754d9cc2ff186c Mon Sep 17 00:00:00 2001 From: Quinten Kock Date: Tue, 2 Dec 2025 22:20:17 +0100 Subject: [PATCH] Fix lsp file sync --- src/app/lsp.ts | 7 +++++++ 1 file changed, 7 insertions(+) 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; }