x/tools/gopls: autocompletion for dependencies not working in Emacs #43414
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, with Go, gopls and Emacs latest versions available for my architecture and distribution, the issue described below is reproducible.
What operating system and processor architecture are you using (
go env
)?go env
OutputEmacs environment:
What did you do?
I was redirected to create a new issue from #36165 and, as suggested by @stamblerre I also installed the latest version of
gopls
.With my
$GOPATH
set, I open a file in a buffer in my Emacs setup with LSP server and go-mode as stated here and with no specific settings for lsp. The issue I come across is missing autocompletion for external packages (that is, dependencies declared in go.mod and installed withgo get
), at the same time, the editor highlights the import of external packages as errors, as well as any use of the imports within the file.Below, an (edited -- removed references to private repo) extract of the output
lsp-log
bufferNOTE: The above log is running latest
gopls
, the log posted in my last comment in #36165 was extracted when running "gopls build in $GOPATH mode" (i.e.: installed likego get golang.org/x/tools/gopls
).Additional information in the
*Messages*
bufferAutocompletion working for external packages, that is, in Emacs,
M-x completion-at-point
should return completions for dependencies.What did you see instead?
M-x completion-at-point
returns nothing when attempting to complete external packages, as opposed to, e.g. runningM-x completion-at-point
overfmt.Er
, which returnsfmt.Errorf(format string, a ...interface{})
The text was updated successfully, but these errors were encountered: