x/tools/gopls: Find values by name without prefixing with the package name #58291
Labels
FeatureRequest
Issues asking for a new feature that does not need a proposal.
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
gopls version
go env
What did you do?
Feature request
It would be nice, if gopls would support this Goland feature: You can easily find a value by its name without importing the package or prefixing with the package name. It allows you to identify, at a first sight, the value you are looking for, especially when you don't remember the package to which it belongs to.
This functionality can be accomplished by searching for a symbol with the usage of the method
workspace/symbol
, and, once the required value is found and its corresponding package is identified, we are able to back to the editor and typing the package followed by the required value. However, this process is a little bit cumbersome and also we have a lack of documentation that the autocompletion system provides (if enabled) when we go down through all completion candidates.What did you expect to see?
All fuzzy matches of exported functions or types from packages in the current workspace and std library.
What did you see instead?
gopls does not report any suggestion if I start typing the package's exported functions or types before importing the package or prefixing with the package name.
Editor and settings
Editor:
gopls:
The text was updated successfully, but these errors were encountered: