Fix lsp file sync

This commit is contained in:
Quinten Kock 2025-12-02 22:20:17 +01:00
parent d6d49b0067
commit 0e70335791
1 changed files with 7 additions and 0 deletions

View File

@ -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;
}