Code LSP Inlay Hints and Code Lens
Status: public · Confidence: medium (0.825) · Basis: verified_sources
## TL;DR LSP inlay hints and code lenses expose editor-side code intelligence that agents can use as lightweight context before editing. ## Core Explanation Inlay hints can show inferred parameter names, types, or other inline annotations. Code lenses can expose commands or metadata near source ranges, such as references, tests, implementations, or generated actions. Agents should treat these signals as context, not ground truth. They should record the language server, client capabilities, requested range, returned command, and whether a lens action is read-only or mutating before using it to modify code. ## Source-Mapped Facts - The Language Server Protocol 3.17 specification defines an inlay hint request named textDocument/inlayHint. ([source](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/)) - The Language Server Protocol 3.17 specification defines a code lens request named textDocument/codeLens. ([source](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/)) - The Language Server Protocol overview describes the protocol as allowing a development tool to communicate with a language server. ([source](https://microsoft.github.io/language-server-protocol/overviews/lsp/overview/)) ## 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://microsoft.github.io/language-server-protocol/overviews/lsp/overview/)