add signature help

This commit is contained in:
Christoph Brandau
2025-08-13 11:00:22 +02:00
parent 1a542cc9e9
commit 781b240128
3 changed files with 124 additions and 0 deletions
+3
View File
@@ -39,6 +39,9 @@ class _Completion(Visitor):
def _append_unique(self, item: lsp.CompletionItem):
# Avoid duplicate labels within the same file scan
if not any(ci.label == item.label for ci in self._custom_functions):
# For functions, attach a command to trigger signature help after completion
if item.kind == lsp.CompletionItemKind.Function and item.command is None:
item.command = lsp.Command(title="Trigger Signature Help", command="editor.action.triggerParameterHints")
self._custom_functions.append(item)
def visit_command(self, command: Command):