Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/gopls: move function signature into detail for completion #32414

Closed
stamblerre opened this issue Jun 3, 2019 · 7 comments
Closed

x/tools/gopls: move function signature into detail for completion #32414

stamblerre opened this issue Jun 3, 2019 · 7 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Suggested Issues that may be good for new contributors looking for work to do.
Milestone

Comments

@stamblerre
Copy link
Contributor

Forked from VSCode-Go: microsoft/vscode-go#2523.
Please comment if you have any opinions on this.

@gopherbot gopherbot added this to the Unreleased milestone Jun 3, 2019
@gopherbot gopherbot added the gopls Issues related to the Go language server, gopls. label Jun 3, 2019
@edganiukov
Copy link

edganiukov commented Jun 3, 2019

I also think label should contain only method/function/etc name and not full signature.
Here is feedback from vim-lsp developer - prabirshrestha/vim-lsp#328 (comment)

Also, this (even so vim-lsp changes completion text after pressing (, but still a bit annoying):
Screenshot 2019-06-03 at 22 24 45

@stamblerre
Copy link
Contributor Author

stamblerre commented Jun 3, 2019

The above image looks like a mistake on the vim-lsp side of things - the text that should get inserted is the TextEdit.NewText field, not the Label.

Edit: InsertText is deprecated, should be TextEdit.

@edganiukov
Copy link

When I select a completion item, it inserts a correct value (with https://github.com/prabirshrestha/vim-lsp/blob/master/doc/vim-lsp.txt#L163 g:lsp_text_edit_enabled enabled). The picture in my previous comment shows situation when I am switching between completion items.

@edganiukov
Copy link

I've checked cquery, rls and go-langserver - all of these return only a name in label and a full signature in detail.

@muirdm
Copy link

muirdm commented Jun 5, 2019

FYI emacs also shows the detail next to the label by default, so this change would not be very disruptive.

Screen Shot 2019-06-05 at 10 33 56 AM

@stamblerre stamblerre added the Suggested Issues that may be good for new contributors looking for work to do. label Jun 10, 2019
@danishprakash
Copy link

I'd like to work on this one.

cc @stamblerre

@stamblerre stamblerre changed the title x/tools/internal/lsp: move function signature into detail for completion x/tools/gopls: move function signature into detail for completion Jul 2, 2019
@gopherbot
Copy link

Change https://golang.org/cl/184777 mentions this issue: internal/lsp: move function signature into detail instead of label

movie-travel-code pushed a commit to movie-travel-code/tools that referenced this issue Jul 11, 2019
Fixes golang/go#32414

Change-Id: If08e655d7a0e29b0865c13d8377e98be01cf24c5
Reviewed-on: https://go-review.googlesource.com/c/tools/+/184777
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
@golang golang locked and limited conversation to collaborators Jul 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Suggested Issues that may be good for new contributors looking for work to do.
Projects
None yet
Development

No branches or pull requests

5 participants