Repository navigation
feat(lsp): symbol operations on the lsp tool - #51775
Open
AlexeyShirshov wants to merge 3 commits into
Open
AlexeyShirshov wants to merge 3 commits into
AlexeyShirshov wants to merge 3 commits into
Conversation
Reuse the already-running language server for semantic C# queries instead of spawning a separate MSBuild/Roslyn daemon. - lsp service: add searchSymbols (unfiltered workspace/symbol), rename, containerName on Symbol and children on DocumentSymbol - lsp client: request hierarchical document symbols - lsp tool: name-based operations structure/types/symbols/members/refs/ callers/implementations/rename, with one-time-per-worktree readiness wait, probe-file caching, symbol ranking and workspace edit application - types: substring filter over fuzzy workspace/symbol results - debug lsp: `tool <operation>` command with --raw/--repeat for benches
Symbol operations had no file argument and bootstrapped from the first C# file, so they only worked for .NET. Pick the server from a caller supplied filePath, or from the project's dominant extension, and query only the servers for that file type.
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #51715
Type of change
What does this PR do?
Adds symbol-name operations to the
lsptool:symbols,members,refs,callers,implementations,rename(dry-run unlessapply=true),types. They are standard LSP requests, so they work for any language with a configured server.Pass
filePathto choose which server answers (any file in the target language); without it, the project's dominant extension is used. The bootstrap file is scoped to the opened directory and only servers for that file type are queried, so a polyglot workspace does not answer a query from an unrelated server.How did you verify your code works?
Ran the operations by name against a TypeScript project and a .NET solution using the compiled single binary;
bun typecheckandbun test test/tool/lsp.test.tspass.Screenshots / recordings
No UI change.
Checklist