MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / getCurrentFileLanguage

Function getCurrentFileLanguage

src/cm/lsp/connectionState.js:3–11  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import serverRegistry from "./serverRegistry";
2
3function getCurrentFileLanguage() {
4 try {
5 const file = window.editorManager?.activeFile;
6 if (!file || file.type !== "editor") return null;
7 return file.currentMode?.toLowerCase() || null;
8 } catch {
9 return null;
10 }
11}
12
13function getServersForCurrentFile() {
14 const language = getCurrentFileLanguage();

Callers 2

index.jsFile · 0.90
getServersForCurrentFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected