pi-diet-lsp
On-demand LSP code-intelligence tools for Pi without automatic diagnostics or context injection.
Package details
Install pi-diet-lsp from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-diet-lsp- Package
pi-diet-lsp- Version
0.1.1- Published
- Jun 1, 2026
- Downloads
- not available
- Author
- probabilityengineer
- License
- MIT
- Types
- extension
- Size
- 23 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-diet-lsp
On-demand LSP code-intelligence tools for Pi without automatic diagnostics or context injection.
pi-diet-lsp gives Pi agents focused, model-visible Language Server Protocol tools for definitions, references, symbols, hover/type information, and diagnostics. It keeps the surface compact and explicit: no automatic diagnostics pipeline, no context injection, no read guard, no skills, and no session-start bootstrap. Agents call the tools when precise code intelligence is useful.
This is intentionally different from automatic LSP feedback extensions: pi-diet-lsp favors low prompt overhead and explicit tool calls over continuously appending diagnostics to every edit.
Tools
lsp_definition— jump to definition at a 1-based file positionlsp_references— find references at a 1-based file positionlsp_symbols— document symbols for a file, or workspace symbols by querylsp_hover— show hover/type info at a 1-based file positionlsp_diagnostics— open a file in LSP and return current diagnostics
lsp_symbols has two modes:
{ "filePath": "src/index.ts", "query": "optional-filter" }
{ "query": "SymbolName" }
With filePath, it returns document symbols. Without filePath, it uses LSP workspace symbol search.
Large symbol/reference results are compacted and capped to avoid runaway context growth.
Install
From npm, after publication:
pi install npm:pi-diet-lsp
From GitHub:
pi install git:github.com/ProbabilityEngineer/pi-diet-lsp
For project-local install, add -l:
pi install -l git:github.com/ProbabilityEngineer/pi-diet-lsp
For local testing:
pi -e ./index.ts
Runtime requirements
LSP tools use language servers from PATH:
- TypeScript/JavaScript:
typescript-language-server --stdio - Python:
pyright-langserver --stdio - Go:
gopls - Rust:
rust-analyzer - Swift:
sourcekit-lsp - JSON:
vscode-json-language-server --stdio - YAML:
yaml-language-server --stdio
Prompt overhead
pi-diet-lsp avoids automatic context injection. It registers compact tools and guidance, then waits for agents to call LSP tools explicitly when code intelligence is relevant.