Fix lsp file sync
This commit is contained in:
parent
d6d49b0067
commit
0e70335791
|
|
@ -6,6 +6,7 @@ import { EditorView } from "@codemirror/view";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
LSPClient,
|
LSPClient,
|
||||||
|
LSPPlugin,
|
||||||
languageServerExtensions,
|
languageServerExtensions,
|
||||||
Workspace,
|
Workspace,
|
||||||
} from "@codemirror/lsp-client";
|
} from "@codemirror/lsp-client";
|
||||||
|
|
@ -107,6 +108,12 @@ class OpenFileWorkspace extends Workspace {
|
||||||
file.version = this.nextFileVersion(file.uri);
|
file.version = this.nextFileVersion(file.uri);
|
||||||
file.changes = ChangeSet.empty(file.doc.length);
|
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;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue