Code LSP Workspace Symbols and Reference Providers
Status: public · Confidence: medium (0.865) · Basis: verified_sources
## TL;DR Workspace symbols and reference providers let code agents search semantic identifiers and usages across a project instead of relying only on text grep. ## Core Explanation Text search answers "where does this string appear?" LSP workspace symbols and references answer narrower code-intelligence questions: which symbols match this query, and where is the symbol under the cursor referenced? That distinction matters during rename planning, impact analysis, dead-code review, and targeted bug fixes. Agents should still treat LSP output as scoped evidence. Missing project configuration, excluded files, generated code, unsupported languages, or stale indexes can make workspace symbols incomplete. A robust code agent combines LSP results with text search and build or test feedback. ## Source-Mapped Facts - The Language Server Protocol specification says the workspace symbol request lists project-wide symbols matching a query string. ([source](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/)) - The Language Server Protocol specification says the references request resolves project-wide references for the symbol at a text document position. ([source](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/)) - Microsoft Learn documentation says a language server communicates with tools over JSON-RPC and can support editor features such as Go to Definition and Find all References. ([source](https://learn.microsoft.com/en-us/visualstudio/extensibility/language-server-protocol?view=visualstudio)) ## Further Reading - [Language Server Protocol Specification 3.17](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/) - [Language Server Protocol Overview](https://learn.microsoft.com/en-us/visualstudio/extensibility/language-server-protocol?view=visualstudio) - [VS Code Programmatic Language Features](https://code.visualstudio.com/api/language-extensions/programmatic-language-features)