pi-lsp-bridge
A config-driven Pi extension that connects language servers over stdio and exposes them as Pi tools
Package details
Install pi-lsp-bridge from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-lsp-bridge- Package
pi-lsp-bridge- Version
1.1.1- Published
- May 18, 2026
- Downloads
- not available
- Author
- lhufo
- License
- MIT
- Types
- extension
- Size
- 27.3 KB
- Dependencies
- 3 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./dist/index.js"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-lsp-bridge
A config-driven Pi extension that connects language servers over stdio and exposes them as Pi tools.
Requirements
- Pi coding agent
- Node.js
- Language server binaries installed on your PATH (e.g.
rust-analyzer,gopls)
Install
pi install npm:pi-lsp-bridge
Or add it to your project settings (.pi/settings.json):
pi install -l npm:pi-lsp-bridge
Configuration
Create .pi/lsp.json in your project root, or ~/.pi/agent/lsp.json for a global fallback.
{
"extMap": {
".rs": "rust",
".go": "go",
".ts": "typescript",
".js": "typescript"
},
"servers": {
"rust": { "command": "rust-analyzer" },
"go": { "command": "gopls" },
"typescript": {
"command": "typescript-language-server",
"args": ["--stdio"]
}
}
}
If no config is found, the extension loads but does nothing and shows a notice.
Tools
The extension registers these tools when a valid config is present:
lsp_hover— type/docs at cursorlsp_definition— go to definitionlsp_references— find referenceslsp_document_symbols— file outlinelsp_workspace_symbol— search symbols across workspace
The LLM calls them like any other tool. Results are returned as JSON.
Reloading
Change your config and run /reload. Pi tears down the extension runtime and restarts it, which disconnects all language servers and reconnects them with the new config.
Files
config.ts— loads.pi/lsp.jsonor~/.pi/agent/lsp.jsonmanager.ts— spawns server processes, manages connections, tracks open filestools.ts— Pi tool definitionsindex.ts— entry point, wires events