From aa6fe2d8f6b003e7fc83aafed14392eba39bc2a3 Mon Sep 17 00:00:00 2001 From: Damien Daspit Date: Fri, 1 Nov 2024 17:03:00 -0500 Subject: [PATCH] Clean up unused code in VS Code extension --- packages/vscode/src/server.ts | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/packages/vscode/src/server.ts b/packages/vscode/src/server.ts index 4984ccb..8831b1d 100644 --- a/packages/vscode/src/server.ts +++ b/packages/vscode/src/server.ts @@ -4,7 +4,6 @@ import { UsfmDocumentFactory } from 'lynx-usfm'; import { CodeAction, createConnection, - DidChangeConfigurationNotification, type DocumentDiagnosticReport, DocumentDiagnosticReportKind, InitializeParams, @@ -27,15 +26,11 @@ const workspace = new Workspace({ onTypeFormattingProviders: [SmartQuoteFormattingProvider], }); -let hasConfigurationCapability = false; let hasWorkspaceFolderCapability = false; connection.onInitialize((params: InitializeParams) => { const capabilities = params.capabilities; - // Does the client support the `workspace/configuration` request? - // If not, we fall back using global settings. - hasConfigurationCapability = capabilities.workspace?.configuration ?? false; hasWorkspaceFolderCapability = capabilities.workspace?.workspaceFolders ?? false; const result: InitializeResult = { @@ -65,18 +60,6 @@ connection.onInitialize((params: InitializeParams) => { return result; }); -connection.onInitialized(() => { - if (hasConfigurationCapability) { - // Register for all configuration changes. - void connection.client.register(DidChangeConfigurationNotification.type, undefined); - } - if (hasWorkspaceFolderCapability) { - connection.workspace.onDidChangeWorkspaceFolders((_event) => { - connection.console.log('Workspace folder change event received.'); - }); - } -}); - connection.languages.diagnostics.on(async (params) => { return { kind: DocumentDiagnosticReportKind.Full,