LspInsight
Give your AI coding assistant compiler-verified code intelligence.
LspInsight is a VS Code extension that exposes Language Server Protocol (LSP) capabilities directly to AI assistants — via the VS Code Language Model Tool API. Instead of guessing at types, signatures, and symbol relationships, AI agents get the same real-time intelligence that powers your IDE.
Why LspInsight?
AI coding assistants generate better code when they have accurate context. Without LSP data, they rely on pattern matching and heuristics. With LspInsight, they get:
- Exact types resolved by the language server
- Actual function signatures with parameter types and documentation
- Real symbol relationships — definitions, references, callers, callees
- IDE-native quick fixes and refactoring suggestions
This works with any language that has an LSP server in VS Code: C/C++, TypeScript, Python, Java, Go, and more.
LspInsight exposes 14 LSP tools to AI assistants through the VS Code Language Model Tool API. These tools provide compiler-verified intelligence across any language with LSP support.
Explore code structure and locate symbols across your codebase.
| Tool |
Purpose |
lsp_definition |
Navigate to a symbol's definition |
lsp_references |
Find all usages of a symbol throughout the workspace |
lsp_workspace_symbols |
Search for symbols (functions, classes, variables) by name |
lsp_document_symbols |
Get a structured outline of all symbols in a file |
lsp_call_hierarchy |
Trace function call chains — who calls this and what it calls |
lsp_type_hierarchy |
Explore class inheritance and interface implementations |
Access precise type information and context-aware suggestions.
| Tool |
Purpose |
lsp_hover |
Retrieve type definitions, signatures, and documentation |
lsp_signature_help |
Get function parameters, types, and usage documentation |
lsp_completion |
Discover available methods, properties, and contextual suggestions |
lsp_diagnostics |
Access language server errors, warnings, and hints |
lsp_selection_range |
Identify semantic code boundaries (expressions, statements, blocks) |
Leverage IDE-native capabilities for safe code transformations.
| Tool |
Purpose |
lsp_code_actions |
Discover quick fixes, refactorings, and code improvements |
lsp_rename_symbol |
Preview all locations affected by renaming a symbol |
lsp_format_document |
Apply language server formatting rules |
Availability
All tools are automatically registered and available to:
- GitHub Copilot via the Language Model Tool API
No additional configuration required — tools activate when a language server is available for the open file.
Installation
From VSIX Package
code --install-extension release/lspinsight.vsix
Or use VS Code UI: Extensions → ⋯ → Install from VSIX…
Getting Started
GitHub Copilot Agent
- Copy
release/LspAgent.agent.md to .github/agents/LspAgent.agent.md in your project.
- Open GitHub Copilot Chat and select LspAgent from the agents list.
The agent follows a "compiler-verified context before code" workflow — it queries LSP tools for types, signatures, and references before writing any code.
Commands
Open the command palette (Ctrl+Shift+P / Cmd+Shift+P):
| Command |
Description |
| LSP Insight: Go to Symbol in Workspace |
Search and navigate to any symbol |
| LSP Insight: Show Call Hierarchy |
Visualize callers and callees of a function |
| LSP Insight: Show Type Hierarchy |
Visualize type inheritance |
| LSP Insight: Find Implementations |
Find implementations of an interface or class |
Right-click context menu:
| Command |
Description |
| Explain Code at Cursor |
AI-powered explanation of the code under the cursor |
| Code Assistant |
AI-assisted refactoring and code modification |
Troubleshooting
Tools not appearing in Copilot?
- Confirm LspInsight is installed and enabled.
- Reload the VS Code window (
Ctrl+Shift+P → Reload Window).
- Verify a language server is active for the open file type.
LSP features returning empty results?
- Check that the relevant language extension is installed (e.g., Python, Java Extension Pack).
- Open View → Output and select the language server channel to inspect errors.
- Ensure the file is saved and belongs to the current workspace.
License
Copyright © Advantest Corporation. All rights reserved.
This software is proprietary to Advantest Corporation.
Author
Created by levanliu