Closed
Description
The go language server started to provide the fzf style search query support but the results are filtered out by VS Code that performs its own matching/sorting on the results the workspace symbols providers return.
For example, for query ^http
, the language server returned
[Trace - 14:04:17.665 PM] Sending request 'workspace/symbol - (171)'.
Params: {"query":"^http"}
[Trace - 14:04:17.706 PM] Received response 'workspace/symbol - (171)' in 40ms.
Result: [
{"name":"httpresponse.Doc","kind":14,"location":{"uri":"file:///Users/hakim/go/src/golang.org/x/tools/go/analysis/passes/httpresponse/httpresponse.go","range":{"start":{"line":18,"character":6},"end":{"line":18,"character":9}}},"containerName":"golang.org/x/tools/go/analysis/passes/httpresponse"},
{"name":"httpresponse.Analyzer","kind":13,"location":{"uri":"file:///Users/hakim/go/src/golang.org/x/tools/go/analysis/passes/httpresponse/httpresponse.go","range":{"start":{"line":34,"character":4},"end":{"line":34,"character":12}}},"containerName":"golang.org/x/tools/go/analysis/passes/httpresponse"},
...
But vscode presents no results since none of the entries match ^http
.
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
findleyr commentedon Sep 16, 2020
This might be a dupe of #98125 -- it would be sufficient for the extension to be able to control symbol filtering and sorting.
hyangah commentedon Sep 16, 2020
Agree with @findleyr - Not sure about sorting when multiple workspace symbol providers are involved (e.g. multi-language projects). Letting the extension do the filtering and preserving the ordering as much as possible would be ideal.
gopls: update to 0.5.0.