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

Function getSignatureHelp

src/cm/lsp/tooltipExtensions.ts:416–435  ·  view source on GitHub ↗
(
	plugin: LSPPlugin,
	pos: number,
	context: SignatureHelpContext,
)

Source from the content-addressed store, hash-verified

414);
415
416function getSignatureHelp(
417 plugin: LSPPlugin,
418 pos: number,
419 context: SignatureHelpContext,
420) {
421 const client = plugin.client as typeof plugin.client & LspClientInternals;
422 if (client.hasCapability?.("signatureHelpProvider") === false) {
423 return Promise.resolve(null);
424 }
425
426 plugin.client.sync();
427 return plugin.client.request<SignatureHelpParams, LspSignatureHelp | null>(
428 "textDocument/signatureHelp",
429 {
430 context,
431 position: plugin.toPosition(pos),
432 textDocument: { uri: plugin.uri },
433 },
434 );
435}
436
437function sameSignatures(a: LspSignatureHelp, b: LspSignatureHelp): boolean {
438 if (a.signatures.length !== b.signatures.length) return false;

Callers 1

startRequestMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected