-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: no completion candidates in emacs after .
#38806
Comments
Thank you for filing a gopls issue! Please take a look at the Troubleshooting guide, and make sure that you have provided all of the relevant information here. |
My emacs config related to lsp & gopls...
gopls and go-mode
company mode
|
It looks like you have an old version of |
however situation is the same.... |
|
What is the output of |
|
$PATH ❯ echo $PATH
|
Hi good people, here is a data point to consider: I've encountered this exact same issue, but sporadically (aka cannot reproduce it every time)
This seemed very weird, because I've updated to the latest gopls using
Reading this thread has given me pointers on what else to look for / debug Started digging into the PATH setup and what path emacs(spacemacs for me) loads. My PATH setup is set so that GOBIN is loaded before
It seems that spacemacs/emacs is injecting a few file paths in front of my PATH setup when calling refresh env vars, meaning when
Still didn't think anything about this since I thought
Upon further verification I've found out that I have an upstream pkg installed called This coupled with the path that emacs/spacemacs injects in front of my defined PATH means that the old gopls was being executed and that broke the completion. After removing the old |
Thanks for the detailed explanation @stefancocora! @arunkhattri: I suspect you are having the same or a similar issue. One more thing to try is |
I suppose we have found the source.... Next ...How can i safely remove gopls... |
|
thanks just did that...will let you know the final outcome... |
Thanks Boss, its working like a charm. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Using emacs 26.3 with emacs-go and emacs-lsp.
after . waiting for completions candidate
buffer message appears:-
no token.File for file:///some_long_path_to/main.go
What did you expect to see?
completion candidate related to os package
What did you see instead?
nothing,
GoPls version information
RPC information
Trace Information
emacs lsp-log
gopls::stderr
The text was updated successfully, but these errors were encountered: