-
Notifications
You must be signed in to change notification settings - Fork 645
Go: Autocomplete Unimported Packages works on variable or package symbols #2469
Comments
I‘ve already tried reinstall all go tools and kill old gocode process. |
I have the same issues, vs code not auto import. |
No, my problem is auto import package while I type '.' after a variable, in this case I just want to see the member of the variable Orz |
i just fixed:
|
Deleting |
I also meet the issues, vs code will show all the packages from gopath rather than the member of the variable. This happens suddenly. I remember it worked well a few days ago. go version go1.12.4 darwin/amd64 vs code setting: {
"go.autocompleteUnimportedPackages": true,
"go.useCodeSnippetsOnFunctionSuggest": true,
"go.useCodeSnippetsOnFunctionSuggestWithoutType": true,
"go.lintTool": "golint",
"go.lintOnSave": "workspace"
} |
I didn't use "go.useLanguageServer" |
This happens to me both go.useLanguageServer and without. It started happening recently. It make autocompleteUnimportedPackages impossible to use. Reverting to 0.9.2 makes the problem disappear. |
Thanks a lot, I'll revert it~ |
FYI @ramya-rao-a -- do you have any idea which 0.10 changes might be related? And thanks for the wonderful plugin! |
I have the same problem:
I backed to 0.9.2, and it solved. Thanks for the suggestion! Coding is impossible with 0.10. |
Hello all, Thanks for reporting the issue. This is definitely a regression i.e. this wasnt a problem in the previous version of this extension (0.9.2). I have pushed a fix for this. Please try the latest beta version of this extension which has the fix for this and let me know how it goes. If a couple of you can confirm the fix, I will release an update soon |
@ramya-rao-a Thanks a lot !! |
@ramya-rao-a The beta version fixes the issue for me. Thanks for the quick response! It also broke my tab size settings - I went from 2 space sized tabs to 8 space sized tabs (ignoring my VSCode settings, which were still set to 2 spaces). But I imagine that's just something to do with the fact that it's a beta version. |
Apologies on the tab size change |
@ramya-rao-a No worries here. That fixed everything perfectly. Thanks so much! |
The fix to this has been released in the latest update (0.10.2) |
@fintanchen Is your project under your GOPATH or are you using Go modules? If you are using Go modules, then yes this feature doesnt work in such cases and I have logged #2484 to track next steps. If you are not using Go modules, then this feature will work regardless of whether you use |
@ramya-rao-a Thans for your work. I am using Go modules. I will check #2484. |
My go extension suddenly doesn't works well on "Go: Autocomplete Unimported Packages".
If I set the setting of "Go: Autocomplete Unimported Packages" to true, it works well if I first type package name on blank line as I wish, for example:
But if I already import the package or using an existing variable, it also show the suggest of package, mixed with the 'Member variables' for example:
And what I used to and expect to see is:
I don't know why and I didn't change any setting before.
Really thanks for help.
go env
The text was updated successfully, but these errors were encountered: