Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/gopls: support workspace/Symbol request #33844

Closed
stamblerre opened this issue Aug 26, 2019 · 15 comments
Closed

x/tools/gopls: support workspace/Symbol request #33844

stamblerre opened this issue Aug 26, 2019 · 15 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@stamblerre
Copy link
Contributor

Forked from microsoft/vscode-go#954.

@gopherbot gopherbot added this to the Unreleased milestone Aug 26, 2019
@gopherbot gopherbot added the gopls Issues related to the Go language server, gopls. label Aug 26, 2019
@gopherbot
Copy link

Thank you for filing a gopls issue! Please take a look at the Troubleshooting section of the gopls Wiki page, and make sure that you have provided all of the relevant information here.

@stamblerre stamblerre added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. and removed gopls Issues related to the Go language server, gopls. labels Aug 26, 2019
@gopherbot gopherbot added the gopls Issues related to the Go language server, gopls. label Aug 26, 2019
@moonnoon
Copy link

moonnoon commented Sep 3, 2019

helm-lsp needs it.

@stamblerre stamblerre added the Tools This label describes issues relating to any tools in the x/tools repository. label Sep 9, 2019
@myitcv
Copy link
Member

myitcv commented Oct 21, 2019

Just to confirm, workspace/Symbol would effectively allow us to show exported package symbols, correct? Or is the plan to have textDocument/documentSymbol satisfy that question?

@stamblerre
Copy link
Contributor Author

workspace/Symbol is used to do a search of the workspace on a particular symbol, whereas textDocument/documentSymbol shows the list of symbols in the a given file.

@myitcv
Copy link
Member

myitcv commented Oct 23, 2019

So is there nothing that corresponds to the package level?

@stamblerre
Copy link
Contributor Author

Not that I am aware of - how would that be displayed by the editor?

@myitcv
Copy link
Member

myitcv commented Oct 24, 2019

In Vim at least I'd imagine doing something like the "Jump to identifier" from godoc:

Screen Shot 2019-10-24 at 09 10 22

@stamblerre
Copy link
Contributor Author

That does sound like a good feature. I encourage you to open up an issue with LSP :)

@gopherbot
Copy link

Change https://golang.org/cl/213317 mentions this issue: internal/lsp: add support for workspace symbol

@daisuzu
Copy link

daisuzu commented Jan 5, 2020

I sent a change because I'd like to use workspace/symbol with Vim.
This can be used as an alternative to ctags.

@stamblerre stamblerre modified the milestones: gopls unplanned, gopls/v1.0.0 Jan 29, 2020
gopherbot pushed a commit to golang/tools that referenced this issue Feb 5, 2020
This change adds support for the LSP workspace/symbol. Unlike
documentSymbol, the target is symbols that exist not only in a specific
file, but also in the current or imported packages. It returns symbols
whose name contains the query string of the request(case-insensitive),
or all symbols if the query string is empty.

However, the following is not implemented:
- Setting of deprecated and containerName fields in SymbolInformation
- Consideration of WorkspaceClientCapabilities
- Progress support
- CLI support

Updates golang/go#33844

Change-Id: Id2a8d3c468084b9d44228cc6ed2ad37c4b52c405
Reviewed-on: https://go-review.googlesource.com/c/tools/+/213317
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
@gopherbot
Copy link

Change https://golang.org/cl/218737 mentions this issue: internal/lsp/source: make matchers selectable in WorkspaceSymbols

gopherbot pushed a commit to golang/tools that referenced this issue Feb 13, 2020
This change allows to use fuzzy or case-sensitive matchers in addition
to case-insensitive when searching for symbols.
Matcher is specified by UserOptions.Matcher just like Completion.

Updates golang/go#33844

Change-Id: I4000fb7984c75f0f41c38d740dbe164398032312
Reviewed-on: https://go-review.googlesource.com/c/tools/+/218737
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
@daisuzu
Copy link

daisuzu commented Feb 29, 2020

@stamblerre
Basic workspace/symbol feature is working now.
However, the following is not implemented, is there anything required for this issue?

If not required, I'd like to implement CLI support for workspace/symbol as the last CL in this issue.

@stamblerre
Copy link
Contributor Author

Thanks for your work on this, @daisuzu! The features you mentioned above don't need to be added.

If not required, I'd like to implement CLI support for workspace/symbol as the last CL in this issue.

That would be great - thanks!

@stamblerre
Copy link
Contributor Author

Closing this issue as this work is complete. The workspace symbols CLI feature can be associated with #32875. Thanks for working on this, @daisuzu!

@daisuzu
Copy link

daisuzu commented Mar 14, 2020

Sure! Thank you for reviewing CLs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

5 participants