x/tools/gopls: function argument placeholders missing in Emacs #44165
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes (I built gopls from HEAD today)
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I'm trying to migrate from using the company-go emacs package (which uses gocode) to the new gopls support in the lsp-mode package. For the most part, lsp-mode with gopls seems strictly better. I'm having trouble getting placeholders to appear during function auto completion, though. This feature seems to be supported through the
lsp-go-use-placeholders
option, which is on by default, but doesn't seem to do anything.What did you expect to see?
Here's an example of what placeholders look like using company-go and selecting a function auto complete item from the menu:
What did you see instead?
The gopls-backed menu has the argument list displayed properly:
However, after selecting an item, no function arguments are displayed:
I'm having a hard time figuring out if this is a problem with gopls, lsp-mode, or company. The fact that the arguments show up in the completion menu makes me think that gopls is successfully returning them (and the gopls log seems to support this). And company works correctly with the older company-go/gocode combo, so maybe lsm-mode simply isn't parsing the arguments returned by gopls correctly?
I'm using lsp-mode from melpa (20210207.705), gopls built from HEAD (today), and emacs in Ubuntu 20.10 (1:26.3+1-1ubuntu2). The screenshots above were generated while using this minimal .emacs configuration:
Here is a log from a session using lsp-mode and gopls: gopls.log
The text was updated successfully, but these errors were encountered: