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

Ignore vendor in workspace symbol search #700

Closed
acroca opened this issue Dec 27, 2016 · 15 comments
Closed

Ignore vendor in workspace symbol search #700

acroca opened this issue Dec 27, 2016 · 15 comments
Assignees

Comments

@acroca
Copy link

acroca commented Dec 27, 2016

Searching symbols in a project with a vendor folder shows all matches in vendor mixed with the project matches.
Is there a way to ignore vendor in the workspace symbol search?

@ramya-rao-a
Copy link
Contributor

@acroca The Go extension uses te go-symbols tool to get all the workspace symbols.
Currently, we don't provide a way to ignore vendor folder in the symbol search.

Can you open an issue in the repo for go-symbols for this feature of ignoring the vendor folder?

@acroca
Copy link
Author

acroca commented Jan 3, 2017

I figured it out checking the code. Is the go-symbols list used anywhere else? like for example going to the implementation of a function...?
Also, re-ordering the list to show project matches first and vendor matches after would work too, not sure if that's doable though.
My main problem, other than speed building the symbols list (~3s) is that the project matches are in the middle of the list..

@ramya-rao-a
Copy link
Contributor

The output of go-symbols is not used anywhere else other than workspace symbols search.

Lets wait for how newhook/go-symbols#3 gets solved.
If we don't hear back, then we can circle back to what the Go extension can do.

@ramya-rao-a
Copy link
Contributor

It doesn't look like we will be getting a response to newhook/go-symbols#3 anytime soon. There is an issue there from March 2016 that has not been addressed yet.

Feel free to fork gosymbols to take a flag to ignore vendor symbols. We can then use that in the Go extension

@acroca
Copy link
Author

acroca commented Feb 6, 2017

I opened a PR on the main repo, but it'll probably get ignored: newhook/go-symbols#4
My fork has the change: https://github.com/acroca/go-symbols, you can use that one. It supports multiple folders too, maybe other people want to ignore other things like test...

@ramya-rao-a
Copy link
Contributor

@acroca Awesome! I'll take a look this week and try to use this in the next update

@acroca
Copy link
Author

acroca commented Feb 6, 2017

Cool! Thanks @ramya-rao-a

@ramya-rao-a ramya-rao-a changed the title Ignore vendor in the symbol search Ignore vendor in workspace symbol search Feb 7, 2017
@ramya-rao-a
Copy link
Contributor

@acroca I have a PR #795 out for integrating your fork of go-symbols.

But at the same time, I don't want to rush into this.

Reason being, we are looking into integration with language server for Go which also implements WorkspaceSymbolProvider, and that might have a different design.

Also, felt like this is not a Go specific feature ask. Therefore logged microsoft/vscode#20579 to see what people think about having this feature implemented in the core product itself.

@acroca
Copy link
Author

acroca commented Feb 14, 2017

@ramya-rao-a Awesome.

@acroca
Copy link
Author

acroca commented Mar 28, 2017

@ramya-rao-a any updates with this?

@ramya-rao-a
Copy link
Contributor

Doesnt look like we will be getting an exclude pattern feature from the core product soon.

I'll try and get the linked PR into the upcoming update which I plan to release in a few days.

Thanks for circling back

@acroca
Copy link
Author

acroca commented Mar 29, 2017

right, I had a look at the related issues around the language server and doesn't seem to be something happening any time soon.
Thanks!

@ramya-rao-a
Copy link
Contributor

PR is merged. Fix will be out in the next update

@acroca
Copy link
Author

acroca commented Mar 29, 2017

Awesome, Thanks

@ramya-rao-a
Copy link
Contributor

This is out in the latest update (0.6.56) to the Go extension

@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

2 participants