-
Notifications
You must be signed in to change notification settings - Fork 645
can't autoimport packages in vendor directories #1147
Comments
Try to restart vs-code after running glide. Maybe related to #1146 |
@airlanggacahya I try it but it doesn't work ( in my windows10) . I remember I can auto-import packages in vendor directories in my ubuntu 16 . I will try it on my ubuntu after I get back home at night .May it isn't a big problem . PS , it can auto-import packages in vendor directories when I use Gogland . |
@airlanggacahya I tried . It can work on ubuntu 16. |
@Hawken94 Do you still see this issue in Windows? When you say auto-import, are you referring to adding the missing import statements when you format the file or save the file? |
@ramya-rao-a No, when I use the package(method) at the first time, vs code can't auto-import it's package in win10. Normally, when I write "println", it will import fmt package automatically. Sorry for my bad english again. But it can work in ubuntu 16. I don't know the reason. |
@Hawken94 We have made some changes around completions for unimported packages. Can you try out the latest Go extension from source and see if that helps?
|
@ramya-rao-a OK,I will try it now. Thank vs code! Thank Microsoft! Thank you for solving my problem. |
@ramya-rao-a Sorry, I took some time to try, but it still dosen't work. It is OK, I almost work on ubuntu16, so it's not a trouble. Thank you again! (windows 10 1703, vs code 1.16.1, go 1.9 ) This issue can be closed.
package: littlezz
|
@Hawken94 Your English is fine, dont worry about it :)
What prompt are you talking about here? Can you share a screenshot? Do you mean auto-completion? Can you check your settings? Do you have |
@ramya-rao-a Thank you for your praise! This is in Ubuntu 16. Firstly,
This is in Windows 10. The version of vscode-go is 0.6.66. I just upgrade it.The setting is OK.
|
Can you run |
@ramya-rao-a When I run Go: Browse Packages command, 'qrcode' appears in the list. But Go: Add Import doesn't. |
Alright, I have a fix in. Can you try the below to see if my fix works for you?
|
@ramya-rao-a I had a try just now. It has a nice prompt. It works. Thank you very much!!! |
No problem, thanks for reporting the issue and Happy Coding! |
@ramya-rao-a I find another problem today. The functions or interfaces can't go to definition if they are in vendor directory . |
@Hawken94 that would be a separate issue. Try setting |
@ramya-rao-a When I set go.docsTool to gogetdoc, it can go to definition.But there is another question. When my mouse on the function, it can't show the definition. Thanks all the way. I think it is not a big problem ^_^ |
@Hawken94 Try running |
I use glide and find that vscode can't autoimport packages in vendor directories . But it can autoimport packages in $GOPATH/src . I don't know the reason . Sorry for my bad english.
The text was updated successfully, but these errors were encountered: