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

Function loadLspHoverHighlightLanguage

src/cm/lsp/tooltipExtensions.ts:182–204  ·  view source on GitHub ↗
(
	language: string,
)

Source from the content-addressed store, hash-verified

180}
181
182export async function loadLspHoverHighlightLanguage(
183 language: string,
184): Promise<Language | null> {
185 const description = findLanguageDescription(language);
186 if (description) {
187 if (description.support) return description.support.language;
188
189 const key = description.name.toLowerCase();
190 let load = hoverLanguageLoads.get(key);
191 if (!load) {
192 load = description
193 .load()
194 .then((support) => support.language)
195 .catch(() => null);
196 hoverLanguageLoads.set(key, load);
197 }
198 return load;
199 }
200
201 const mode = findPluginMode(language);
202 if (!mode) return null;
203 return pluginHoverLanguages.get(mode) || startPluginLanguageLoad(mode);
204}
205
206function getFenceLanguage(info: string): string {
207 const trimmed = info.trim();

Callers 1

Calls 6

findLanguageDescriptionFunction · 0.85
findPluginModeFunction · 0.85
startPluginLanguageLoadFunction · 0.85
setMethod · 0.80
getMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected