-
Notifications
You must be signed in to change notification settings - Fork 646
Auto-complete didn't work before saving file with at least one time usage #2575
Comments
I have the same problem. |
@zulhfreelancer It looks like you are using the language server, in this case The language server at the moment does not support the auto-completion feature for packages that haven't been imported yet. @stamblerre Is there an issue tracking this for gopls? |
Thank you for the respond @ramya-rao-a. How do I switch from language server to |
@zulhfreelancer Set "go.languageServerExperimentalFeatures": {
"autoComplete": false
} Though, if you are using modules, we strongly suggest to use the language server as the back up tools are no longer under active development in favor of the language server |
The upstream issue is golang/go#31906. |
@stamblerre golang/go#31906 is about getting the unimported packages themselves in the completion list, and then on completion, the import statement gets added automatically This issue is that typing |
I think the two are effectively the same issue though. In the case that you type |
@ramya-rao-a thank you. I can confirm it's working now after adding the snippet above. Since I'm using Go Modules, I'm keeping This is my full settings file content:
|
@stamblerre They are not the same golang/go#31906 or at least the vscode-go issue it is referring to #2484 is about typing This issue is about typing |
Added a note to the issue. I think they will still be implemented effectively the same way, so that issue can cover both cases. |
@ramya-rao-a: golang/go#31906 is now closed, and unimported completions will be on by default for |
Hi,
I'm on OSX and currently using
go1.11.4 darwin/amd64
withGO111MODULE
is set toon
. My VS Code editor version is 1.35.1 (c7d83e57cd18f18026a8162d042843bda1bcf21f) and here is my .zshrc content:From what I noticed, the auto-complete is not working if I haven't use the package:
After using a package and save the file, the auto-complete works:
Note:
This main.go file is located in /Users/zulh/go/src/github.com/zulhfreelancer/go_parity_next_nonce
Here is the result for
Go: Browse Packages
:When I try to close the
gocode
, here is what I got:When I run
gocode-gomod -s -debug
, nothing appears in my Terminal when I'm typing code in VS Code editor.Here are my settings:
What should I do to make the auto-complete work before I import and save the package?
Thank you.
The text was updated successfully, but these errors were encountered: