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

Function getLanguageCandidates

src/cm/lsp/tooltipExtensions.ts:75–85  ·  view source on GitHub ↗
(language: string)

Source from the content-addressed store, hash-verified

73}
74
75function getLanguageCandidates(language: string): string[] {
76 const normalized = normalizeLanguageName(language);
77 if (!normalized) return [];
78
79 const candidates = new Set([normalized]);
80 if (normalized.endsWith("react")) {
81 const withoutReact = normalized.slice(0, -"react".length);
82 if (withoutReact) candidates.add(withoutReact);
83 }
84 return [...candidates];
85}
86
87function findLanguageDescription(language: string): LanguageDescription | null {
88 for (const candidate of getLanguageCandidates(language)) {

Callers 2

findLanguageDescriptionFunction · 0.85
findPluginModeFunction · 0.85

Calls 2

normalizeLanguageNameFunction · 0.85
addMethod · 0.80

Tested by

no test coverage detected