question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow extensions to fully control workspace symbol search (matching and highlights)

See original GitHub issue

For qualified workspace-symbols queries like llvm::Str, our language server returns results like {containerName: "llvm", name: "StringRef"}.

VSCode attempts to fuzzy-match the query (llvm::Str) against the name only (StringRef). Because this always fails, it doesn’t display any results.

In #23509 it’s suggested this is something extensions should deal with, but it’s not clear what extensions can do. The provideWorkspaceSymbols extension point must return SymbolInformation which are then filtered by name. Adding the qualifier to name means it is displayed twice - once in name and once in containerName.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:48
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
sam-mccallcommented, May 20, 2020

@bpasero Thanks! A couple of other options too:

  • Splitting the query on the last run of punctuation would work well at least for the languages I’m familiar with: match the last segment against the name and previous text against containerName.
  • code completion is analogous and allows for providing filterText specifically for the purposes of matching. (Though AIUI this complicates display)
1reaction
gabrocommented, Sep 17, 2021

Adding some more info about this, I’ve detailed our use case for Metals (the Scala language server) here (before realizing it was a duplicate issue) https://github.com/microsoft/vscode/issues/133313

Read more comments on GitHub >

github_iconTop Results From Across the Web

User and Workspace Settings - Visual Studio Code
When you search using the Search bar, it will not only show and highlight the settings matching your criteria, but also filter out...
Read more >
Workspace Search in VS Code — A deep dive on ... - YouTube
This Code 0 to 20 looks at workspace search in VS Code. Workspace search lets you search through the contents of your workspace...
Read more >
Useful VS Code Extensions For Front-End Developers
Easily highlight matching tags wih Bracket Pair Colorizer. A real time-saver. Now that you've got full control over your brackets, another ...
Read more >
Chrome Enterprise and Education release notes
There is a new warning icon for Extensions that are still using Manifest v2. To enable the Apps & Extension Usage Report, see...
Read more >
Language Server Protocol Specification - 3.17
This will allow server that are written for a very specific client make full ... Character classes: matching control characters using caret notation...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found