Skip to content

feat(lsp): symbol operations on the lsp tool - #51775

Open
AlexeyShirshov wants to merge 3 commits into
anomalyco:devfrom
AlexeyShirshov:lsp-fix
Open

AlexeyShirshov wants to merge 3 commits into
anomalyco:devfrom
AlexeyShirshov:lsp-fix

Conversation

@AlexeyShirshov

@AlexeyShirshov AlexeyShirshov commented Sep 28, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #51715

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds symbol-name operations to the lsp tool: symbols, members, refs, callers, implementations, rename (dry-run unless apply=true), types. They are standard LSP requests, so they work for any language with a configured server.

Pass filePath to 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 typecheck and bun test test/tool/lsp.test.ts pass.

Screenshots / recordings

No UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

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.
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Sep 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Sep 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Symbol-based operations for the lsp tool

1 participant