Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Allow gb package lookup mode for completions #547

Closed
kulshekhar opened this issue Oct 20, 2016 · 12 comments
Closed

Allow gb package lookup mode for completions #547

kulshekhar opened this issue Oct 20, 2016 · 12 comments

Comments

@kulshekhar
Copy link

Currently while using gb, autocomplete doesn't work properly (this is different from #249)

To get autocomplete working with a project using gb, we need to execute the following command manually:

gocode set package-lookup-mode gb

(reference)

It would be very useful to have the ability to set options like these in workspace/user settings (for example, under go.gocode.options)

If this is implemented, it would also be helpful if these options are set when switching between projects that have different settings. For example, when switching from a project using gb to a regular go project, the extension to execute

gocode set package-lookup-mode go

and vice versa.

@ramya-rao-a
Copy link
Contributor

@kulshekhar, @zmb3, @methane, @offero, @mm-z, @Aleander and others who have upvoted this feature request,

I have added the option to set the package-lookup-mode and this feature will be out in the next update. Since I don't use gb myself, I need some help testing this. Can any of you help? Below are the steps

@ramya-rao-a
Copy link
Contributor

Hey All, did any of you get to try this out?

@kulshekhar
Copy link
Author

I stopped using gb a few months after creating this issue so I don't have anything right now to test this with. However, I'll set a quick project up on the weekend and will post the findings back here.

@ramya-rao-a ramya-rao-a changed the title Allow setting options for gocode Allow gb package lookup mode for completions Nov 17, 2017
@murugan100
Copy link

Installing extension is throwing error

  1. wget https://github.com/Microsoft/vscode-go/blob/master/Go-latest.vsix
  2. code --install-extension ./Go-latest.vsix
    Error: end of central directory record signature not found
    at /usr/share/code/resources/app/node_modules/yauzl/index.js:183:14
    at /usr/share/code/resources/app/node_modules/yauzl/index.js:618:5
    at /usr/share/code/resources/app/node_modules/fd-slicer/index.js:32:7
    at FSReqWrap.wrapper [as oncomplete] (fs.js:629:17)

@kulshekhar
Copy link
Author

I was unable to install the extension.

~/tmp $ code --install-extension Go-latest.vsix
Error: end of central directory record signature not found
    at /usr/share/code/resources/app/node_modules/yauzl/index.js:183:14
    at /usr/share/code/resources/app/node_modules/yauzl/index.js:618:5
    at /usr/share/code/resources/app/node_modules/fd-slicer/index.js:32:7
    at FSReqWrap.wrapper [as oncomplete] (fs.js:629:17)

@ramya-rao-a
Copy link
Contributor

@murugan100 @kulshekhar What OS are you on? I tried on Windows and Mac and the installation works as expected.

@murugan100
Copy link

Ubuntu 17.04

@kulshekhar
Copy link
Author

Linux Mint 18.2 (~Ubuntu 16.04)

@ramya-rao-a
Copy link
Contributor

I just tried on an Ubuntu (14.04) and it works.
I have updated the vsix today for another bug fix.
Can you try downloading and installing again?

@ramya-rao-a
Copy link
Contributor

@murugan100, @kulshekhar

I tried downloading the vsix using wget and then installing. I get the same error as you.
I always have the repo cloned. And when installing from the cloned repo, I dont see the error.

For now, can you clone the vscode-go repo and try installing from the repo?
I'll look into why the other way doesnt work

@murugan100
Copy link

Installing from the cloned repo works.

@ramya-rao-a
Copy link
Contributor

This feature is now out in the latest update to the Go extension (0.6.69)
Add the setting "go.gocodePackageLookupMode": "gb" to use it

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants