x/tools/gopls: handle DocumentSymbol request using syntax info #52797
Labels
Documentation
Issues describing a change to documentation.
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
Currently gopls uses type information in populating DocumentSymbol responses.
As a result, it is available only if the file is in the current workspace or build set.
For example, if the current file is excluded by build tag or GOOS/GOARCh constraints
DocumentSymbol is completely empty.
Editors and plugins like VS Code and VS Code Go heavily rely on DocumentSymbol
(e.g. Test function discovery, Breadcrumb, ...) - mostly for go file parsing info.
Completely omitting DocumentSymbol limits the utility.
From a quick investigation, the type info provides very little additional info for
DocumentSymbol, so consider changing the implementation to use only syntax info.
The text was updated successfully, but these errors were encountered: