fix(server): Improve function names

This commit is contained in:
Myzel394 2025-02-13 21:13:59 +01:00
parent 3131023ef2
commit fe8a42d37b
No known key found for this signature in database
GPG Key ID: ED20A1D1D423AF3F
2 changed files with 6 additions and 5 deletions

View File

@ -1,7 +1,8 @@
import { GenericNotificationHandler } from "vscode-languageclient"; import { GenericNotificationHandler } from "vscode-languageclient";
import { tempUndetectableFiles } from "./shared"; import { tempUndetectableFiles } from "./shared";
export const onDetectable: GenericNotificationHandler = async (params: LSPLanguageDetected) => { export const onLanguageDetectable: GenericNotificationHandler = async (params: LSPLanguageDetected) => {
// Hide warning box
tempUndetectableFiles.add(params.Uri); tempUndetectableFiles.add(params.Uri);
} }

View File

@ -7,8 +7,8 @@ import {
type LanguageClientOptions, type LanguageClientOptions,
type ServerOptions, type ServerOptions,
} from "vscode-languageclient/node"; } from "vscode-languageclient/node";
import { onUndetectable } from "./events/on-undetectable"; import { onLanguageUndetectable } from "./events/on-language-undetectable";
import { onDetectable as onDetected } from "./events/on-detectable"; import { onLanguageDetectable } from "./events/on-language-detected";
const IS_DEBUG = const IS_DEBUG =
process.env.VSCODE_DEBUG_MODE === "true" || process.env.VSCODE_DEBUG_MODE === "true" ||
@ -52,8 +52,8 @@ export async function activate({subscriptions}: ExtensionContext) {
await client.start(); await client.start();
console.info("Started config-lsp"); console.info("Started config-lsp");
subscriptions.push(client.onNotification("$/config-lsp/languageUndetectable", onUndetectable)) subscriptions.push(client.onNotification("$/config-lsp/languageUndetectable", onLanguageUndetectable))
subscriptions.push(client.onNotification("$/config-lsp/detectedLanguage", onDetected)) subscriptions.push(client.onNotification("$/config-lsp/detectedLanguage", onLanguageDetectable))
} }
function getBundledPath(): string { function getBundledPath(): string {