@balaenis/pi-lsp
pi lsp support
Package details
Install @balaenis/pi-lsp from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@balaenis/pi-lsp- Package
@balaenis/pi-lsp- Version
0.2.0- Published
- Aug 2, 2026
- Downloads
- 429/mo · 45/wk
- Author
- pzyyll
- License
- Apache-2.0
- Types
- extension
- Size
- 136.9 KB
- Dependencies
- 1 dependency · 4 peers
Pi manifest JSON
{
"extensions": [
"./dist/index.js"
],
"external": [
"vscode-jsonrpc"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@balaenis/pi-lsp
Language Server Protocol support for Pi's coding agent. Provides code intelligence operations (go-to-definition, find-references, hover, document/workspace symbols, call hierarchy, go-to-implementation) via the lsp tool, passive diagnostics, a statusline health indicator, and /lsp slash commands.
Features
- Nine
lsptool operations (definition, references, hover, symbols, call hierarchy, implementation) - Passive diagnostics from every active server covering a file (primary + companions), push and pull; batched into one hidden durable message on the next user-initiated agent run (does not steer an active run)
- Zero-config autodetection for 16 common language servers
- Multi-server routing: one primary for navigation, zero or more companions for diagnostics
- Built-in Tailwind CSS companion (opt-in via
enabled: trueor/lsp config) - Built-in ESLint + oxlint companions for JS/TS lint diagnostics
- Restart-on-crash with bounded retryable startup attempts
- Statusline health indicator and
/lsp status|diagnostics|clean|start|configcommands - Per-project JSONC config with field-level recipe merging
Local development
The package is not published to a registry yet. Build it and load it with -e:
mise run build --package packages/pi-lsp
pi -e ./packages/pi-lsp/dist/index.js
Documentation
- Tutorial: Get LSP intelligence in Pi - load the extension, rely on autodetection, query a symbol
- How-to guides - configure custom servers, override/disable recipes, add companions, inspect/clean diagnostics
- Reference -
lspoperations, config fields, built-in recipes, statusline states, slash commands, env vars - Explanation - multi-server routing, startup failure classification, diagnostics push/pull, autodetection precedence
Development
mise run build --package packages/pi-lsp # build
mise run dev --package packages/pi-lsp # build with sourcemaps (watch)
mise run test --package packages/pi-lsp
mise run typecheck --package packages/pi-lsp
hk check # eslint + prettier (repo-wide)
Regenerate the config JSON Schema after changing src/types.ts:
bun run --cwd packages/pi-lsp gen:schema
Validation
- Static:
mise run typecheck --package packages/pi-lsp+hk check. - Functional: requires a real LSP server binary (
typescript-language-server,pyright, etc.) in a real project - no mocks.
License
See LICENSE.