Skip to content

Show function symbols in workspace symbols #19486

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
musjj opened this issue Mar 31, 2025 · 1 comment
Closed

Show function symbols in workspace symbols #19486

musjj opened this issue Mar 31, 2025 · 1 comment
Labels
A-ide general IDE features C-feature Category: feature request

Comments

@musjj
Copy link

musjj commented Mar 31, 2025

On VS Code, workbench.action.gotoSymbol shows functions, consts, etc. for the current file, but workbench.action.showAllSymbols only shows structs and nothing else.

@musjj musjj added the C-feature Category: feature request label Mar 31, 2025
@roife roife added the A-ide general IDE features label Apr 9, 2025
@ChayimFriedman2
Copy link
Contributor

By default, in workspace search we only show types, because they are "more important". If there are no matching types we do show functions. You can also set the setting "rust-analyzer.workspace.symbol.search.kind": "all_symbols" to always include functions. In other editors, you can append # to the query (foo#) to search for functions. Unfortunately, in VSCode it does not work, and this is not something we control. The issue tracking improvements to LSP to allow us to do this in VSCode is microsoft/language-server-protocol#2091. You can upvote it, perhaps it will help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ide general IDE features C-feature Category: feature request
Projects
None yet
Development

No branches or pull requests

3 participants