x/tools/gopls: supply imported package names in documentSymbol results #40514
Labels
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
I want to replace vscode-go's existing
DocumentSymbolsProvider
withgopls
.The extension currently uses the
go-outline
tool to extract the document symbol informationand uses it for various purposes (creating codelenses, generate test functions, call other tools, etc).
Even though I think most of them will be eventually replaced with
gopls
and the extension itselfdoes not have to retrieve the information directly, I still think it's useful for the extension to access
the info, and possibly relay the info to other extensions (e.g. golang/vscode-go#404)
Looking into
gopls
's responses and implementation, it looks like the response currentlyincludes functions and variables declarations.
The existing vscode-go provider provides imported package names. The names are used
when checking the file depends on a package of interest - e.g. whether the test file imports
a popular test framework?
Not sure how the LSP's symbol kinds map to Go's type. For reference -
he following is the currently used mapping by vscode-go's existing symbol provider.
The text was updated successfully, but these errors were encountered: