Skip to content

Improve ordering of "Go to symbol in workspace" results #71951

@olafurpg

Description

@olafurpg

Currently, workspace/symbol results are sometimes sorted in alphabetical order making it difficult to navigate to certain symbols

Screenshot 2019-04-08 at 20 03 16

I expected "CompletionSuite", which is at the bottom in the screenshot, to appear at the top because

  • it's the shortest result
  • it has a shared prefix "Compl" with the query "ComplSuite"

In this particular case, the language server (Metals, https://marketplace.visualstudio.com/itemdetails?itemName=scalameta.metals) returns "CompletionSuite" at the top of the results.

It would be nice if Visual Studio Code could either

  • improve the default ordering of items, or
  • introduce some option like "editor.workspaceSymbolOrdering": "default" | "language-server" to preserve the ordering from the language server

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions