Skip to content

Allow fzf style query in workspaceSymbols #106788

Closed
@hyangah

Description

@hyangah

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.

Activity

removed their assignment
on Sep 16, 2020
findleyr

findleyr commented on Sep 16, 2020

@findleyr

This might be a dupe of #98125 -- it would be sufficient for the extension to be able to control symbol filtering and sorting.

hyangah

hyangah commented on Sep 16, 2020

@hyangah
Author

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.

added a commit that references this issue on Sep 17, 2020
locked and limited conversation to collaborators on Jan 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @bpasero@jrieken@hyangah@findleyr

        Issue actions

          Allow fzf style query in workspaceSymbols · Issue #106788 · microsoft/vscode