diff --git a/internal/lsp/cmd/capabilities_test.go b/internal/lsp/cmd/capabilities_test.go index 02f7fab828..aebed67e7a 100644 --- a/internal/lsp/cmd/capabilities_test.go +++ b/internal/lsp/cmd/capabilities_test.go @@ -130,15 +130,11 @@ func TestCapabilities(t *testing.T) { t.Fatal(err) } for _, item := range list.Items { - // We expect the "editor.action.triggerParameterHints" command for functions and methods. - if item.Kind == protocol.MethodCompletion || item.Kind == protocol.FunctionCompletion { - continue - } // All other completion items should have nil commands. // An empty command will be treated as a command with the name '' by VS Code. // This causes VS Code to report errors to users about invalid commands. if item.Command != nil { - t.Errorf("unexpected command for non-function completion item") + t.Errorf("unexpected command for completion item") } // The item's TextEdit must be a pointer, as VS Code considers TextEdits // that don't contain the cursor position to be invalid. diff --git a/internal/lsp/completion.go b/internal/lsp/completion.go index 0c3cc97795..cd94bbf0b4 100644 --- a/internal/lsp/completion.go +++ b/internal/lsp/completion.go @@ -119,15 +119,6 @@ func toProtocolCompletionItems(candidates []source.CompletionItem, rng protocol. Preselect: i == 0, Documentation: candidate.Documentation, } - // Trigger signature help for any function or method completion. - // This is helpful even if a function does not have parameters, - // since we show return types as well. - switch item.Kind { - case protocol.FunctionCompletion, protocol.MethodCompletion: - item.Command = &protocol.Command{ - Command: "editor.action.triggerParameterHints", - } - } items = append(items, item) } return items