@lebronj/pi-lsp
v0.0.3
Published
Optional LSP code-intelligence package for pi
Maintainers
Readme
@lebronj/pi-lsp
Optional Language Server Protocol package for pi. It adds a full lsp tool without patching @earendil-works/pi-coding-agent core, so the core package can continue to track upstream.
Install
pi install npm:@lebronj/pi-lspFor local development from this monorepo:
pi install /home/jianghp3/gaia/pi-mono/packages/pi-lspRemove it with:
pi remove npm:@lebronj/pi-lspTool
The package registers one tool, lsp, with these actions:
diagnostics: file, glob, or workspace diagnostics (file: "*")definition,type_definition,implementation,referenceshoversymbols: document symbols or workspace symbol search (file: "*",queryrequired)rename: symbol-aware rename, preview or applyrename_file: move files/directories and let language servers update references/importscode_actions: list quick fixes/refactors or apply a matching actionstatus,capabilities,request,reload
Configuration
The package auto-detects language servers from project markers and available binaries. Override or add servers with any of:
lsp.json,.lsp.json,lsp.yaml,.lsp.yaml,lsp.yml,.lsp.yml.pi/lsp.json,.pi/lsp.yaml,.pi/lsp.yml~/.pi/agent/lsp.json,~/.pi/agent/lsp.yaml,~/.pi/agent/lsp.yml~/lsp.json,~/.lsp.json, YAML variants
Example:
{
"idleTimeoutMs": 600000,
"servers": {
"typescript-language-server": {
"command": "typescript-language-server",
"args": ["--stdio"],
"fileTypes": [".ts", ".tsx", ".js", ".jsx"],
"rootMarkers": ["package.json", "tsconfig.json"]
}
}
}Requirements
Install the language servers you want to use separately, for example typescript-language-server, rust-analyzer, gopls, or pyright-langserver. This package does not bundle language servers.
