Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

fix: fix copilot in LSP extension upgrade (#4189)

Myles Scolnicke222d6b9774f
diff --git a/frontend/src/core/codemirror/copilot/client.ts b/frontend/src/core/codemirror/copilot/client.ts
index 8dac360063..d9d9182bd9 100644
--- a/frontend/src/core/codemirror/copilot/client.ts
+++ b/frontend/src/core/codemirror/copilot/client.ts
@@ -104,5 +104,14 @@ export function copilotServer() {
documentUri: FILE_URI,
client: getCopilotClient(),
languageId: LANGUAGE_ID,
+ // Disable all basic LSP features
+ // we only need textDocument/didChange
+ hoverEnabled: false,
+ completionEnabled: false,
+ definitionEnabled: false,
+ renameEnabled: false,
+ codeActionsEnabled: false,
+ signatureHelpEnabled: false,
+ diagnosticsEnabled: false,
});
}
diff --git a/frontend/src/core/codemirror/copilot/extension.ts b/frontend/src/core/codemirror/copilot/extension.ts
index 304d6426d7..5b4693036f 100644
--- a/frontend/src/core/codemirror/copilot/extension.ts
+++ b/frontend/src/core/codemirror/copilot/extension.ts
@@ -137,9 +137,8 @@ export const copilotBundle = (config: CompletionConfig): Extension => {
return [
...extensions,
- // grab the first 4 elements of the array is the LSP without hover/autocompletion
// place in own compartment so it doesn't interfere with other LSP
- copilotCompartment.of(copilotServer().slice(0, 4)),
+ copilotCompartment.of(copilotServer()),
];
};