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

Function hoverRequest

src/cm/lsp/tooltipExtensions.ts:351–365  ·  view source on GitHub ↗
(plugin: LSPPlugin, pos: number)

Source from the content-addressed store, hash-verified

349}
350
351function hoverRequest(plugin: LSPPlugin, pos: number) {
352 const client = plugin.client as typeof plugin.client & LspClientInternals;
353 if (client.hasCapability?.("hoverProvider") === false) {
354 return Promise.resolve(null);
355 }
356
357 plugin.client.sync();
358 return plugin.client.request<HoverParams, Hover | null>(
359 "textDocument/hover",
360 {
361 position: plugin.toPosition(pos),
362 textDocument: { uri: plugin.uri },
363 },
364 );
365}
366
367function lspTooltipSource(
368 view: EditorView,

Callers 1

lspTooltipSourceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected