Skip to content

Commit

Permalink
Clean up unused code in VS Code extension
Browse files Browse the repository at this point in the history
  • Loading branch information
ddaspit committed Nov 1, 2024
1 parent c981c51 commit aa6fe2d
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions packages/vscode/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { UsfmDocumentFactory } from 'lynx-usfm';
import {
CodeAction,
createConnection,
DidChangeConfigurationNotification,
type DocumentDiagnosticReport,
DocumentDiagnosticReportKind,
InitializeParams,
Expand All @@ -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 = {
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit aa6fe2d

Please sign in to comment.