@narumitw/pi-biome-lsp
v0.1.20
Published
Pi extension that exposes Biome language-server tools for diagnostics, formatting, and fixes.
Maintainers
Readme
🧬 pi-biome-lsp — Biome Language Server Tools for Pi
@narumitw/pi-biome-lsp is a native Pi coding agent extension that exposes Biome language-server tools.
Use it to give Pi Biome diagnostics, formatting, import organization, and safe source fixes through Language Server Protocol (LSP) workflows.
✨ Features
- Runs
biome lsp-proxyon demand for diagnostics. - Computes or writes formatting edits for Biome-supported files.
- Computes or writes Biome source actions such as
source.fixAll.biomeandsource.organizeImports.biome. - Supports workspace roots, file limits, and recursive file discovery.
- Starts the language server only for tool calls, then shuts it down.
- Shows statusline activity only while Biome LSP tools are running.
- Provides clear setup errors when Biome is missing.
📦 Install
pi install npm:@narumitw/pi-biome-lspTry without installing permanently:
pi -e npm:@narumitw/pi-biome-lspTry this package locally from the repository root:
pi -e ./extensions/pi-biome-lsp✅ Requirements
Install Biome somewhere on PATH, for example:
npm install -D @biomejs/biomeOr provide a custom server command:
PI_BIOME_LSP_COMMAND="npx biome lsp-proxy" pi -e ./extensions/pi-biome-lspOptional timeout override:
PI_BIOME_LSP_TIMEOUT_MS=30000 pi -e ./extensions/pi-biome-lsp🛠️ Pi tools
biome_lsp_diagnostics— startbiome lsp-proxy, open supported files, and return diagnostics.biome_lsp_format— compute or write formatting edits for one file.biome_lsp_fix— compute or write source actions such assource.fixAll.biomeorsource.organizeImports.biome.
🚀 Examples
Check a project subset with Biome diagnostics:
{
"paths": ["src", "extensions/pi-biome-lsp/src"],
"limit": 100
}Format a TypeScript file with Biome:
{
"path": "src/index.ts",
"write": true
}Organize imports with Biome:
{
"path": "src/index.ts",
"kind": "source.organizeImports.biome",
"write": true
}If paths is omitted for diagnostics, the tool recursively discovers Biome-supported files under the workspace root, skipping common generated and dependency directories.
💬 Command
/biome-lspShows the configured Biome LSP command and whether it is available on PATH.
🗂️ Package layout
extensions/pi-biome-lsp/
├── src/
│ └── biome-lsp.ts
├── README.md
├── LICENSE
├── tsconfig.json
└── package.json🔎 Keywords
Pi extension, Pi coding agent, Biome LSP, Biome formatter, Biome linter, import organization, Language Server Protocol, AI coding tools.
📄 License
MIT. See LICENSE.
