diff --git a/internal/lsp/completion.go b/internal/lsp/completion.go index c6ff4a2..af1158a 100644 --- a/internal/lsp/completion.go +++ b/internal/lsp/completion.go @@ -111,8 +111,13 @@ func (s *server) Completion(ctx context.Context, reply jsonrpc2.Replier, req jso if pkg != nil { for _, s := range pkg.Symbols { items = append(items, protocol.CompletionItem{ - Label: s.Name, - InsertText: s.Name, + Label: s.Name, + InsertText: func() string { + if s.Kind == "func" { + return s.Name + "()" + } + return s.Name + }(), Kind: symbolToKind(s.Kind), Detail: s.Signature, Documentation: s.Doc,