You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`@narumitw/pi-lsp` keeps the public tool Interface from the now-deprecated `@narumitw/pi-biome-lsp` and `@narumitw/pi-python-lsp` packages while moving common LSP behavior into a shared runner Module.
3
+
`@narumitw/pi-lsp` keeps Biome, ty, and Ruff behavior from the now-deprecated `@narumitw/pi-biome-lsp` and `@narumitw/pi-python-lsp` packages while exposing a smaller language/file-extension routed public tool interface.
`@narumitw/pi-lsp` is a native [Pi coding agent](https://pi.dev) extension that exposes Biome, ty, and Ruff language-server tools through one shared LSP runner Module.
5
+
`@narumitw/pi-lsp` is a native [Pi coding agent](https://pi.dev) extension that exposes Biome, ty, and Ruff language-server behavior through language/file-extension routed Pi tools.
6
6
7
7
It supersedes the older split packages `@narumitw/pi-biome-lsp` and `@narumitw/pi-python-lsp`, which now live under `extensions/deprecated/` and are excluded from active workspace scripts.
8
8
9
9
## ✨ Features
10
10
11
-
-Runs `biome lsp-proxy` on demand for diagnostics, formatting, import organization, and source fixes.
12
-
-Runs `ty server` on demand for Python type diagnostics.
13
-
-Runs `ruff server` on demand for Python lint diagnostics, formatting, import organization, and source fixes.
11
+
-Routes Biome-supported web/config files to `biome lsp-proxy` for diagnostics, formatting, import organization, and source fixes.
12
+
-Routes Python `.py` and `.pyi`type diagnostics to `ty server`.
13
+
-Routes Python `.py` and `.pyi`lint diagnostics, formatting, import organization, and source fixes to `ruff server`.
14
14
- Uses one internal LSP runner for JSON-RPC framing, subprocess lifecycle, diagnostics, formatting, code actions, and workspace edit application.
15
-
- Keeps Biome, ty, and Ruff behavior in small server Adapters.
- Keeps Biome, ty, and Ruff behavior in small server adapters.
16
+
- Supports workspace roots, file limits, recursive file discovery, language overrides, and write-or-preview edits.
17
17
- Starts language servers only for tool calls, then shuts them down.
18
18
- Shows statusline activity only while LSP tools are running.
19
19
@@ -37,17 +37,19 @@ pi -e ./extensions/pi-lsp
37
37
38
38
## ⚠️ Tool-name compatibility
39
39
40
-
This package intentionally registers the same tool names as `@narumitw/pi-biome-lsp` and `@narumitw/pi-python-lsp`:
40
+
This package now exposes three language/file-extension routed tools instead of the old backend-specific tool names:
41
41
42
-
-`biome_lsp_diagnostics`
43
-
-`biome_lsp_format`
44
-
-`biome_lsp_fix`
45
-
-`ty_lsp_diagnostics`
46
-
-`ruff_lsp_diagnostics`
47
-
-`ruff_lsp_format`
48
-
-`ruff_lsp_fix`
42
+
| Old tool | New call |
43
+
| --- | --- |
44
+
|`biome_lsp_diagnostics`|`lsp_diagnostics` with `language: "web"` when an override is needed |
45
+
|`biome_lsp_format`|`lsp_format` for a Biome-supported file |
46
+
|`biome_lsp_fix`|`lsp_fix` for a Biome-supported file |
47
+
|`ty_lsp_diagnostics`|`lsp_diagnostics` with `language: "python"`, `checker: "type"`|
48
+
|`ruff_lsp_diagnostics`|`lsp_diagnostics` with `language: "python"`, `checker: "lint"`|
49
+
|`ruff_lsp_format`|`lsp_format` for a Python file |
50
+
|`ruff_lsp_fix`|`lsp_fix` for a Python file |
49
51
50
-
Avoid installing `@narumitw/pi-lsp` side by side with the older deprecated LSP packages unless you have verified how your Pi version handles duplicate tool names.
52
+
Avoid installing `@narumitw/pi-lsp` side by side with the older deprecated LSP packages unless you have verified how your Pi version handles overlapping capabilities.
51
53
52
54
## ✅ Requirements
53
55
@@ -85,22 +87,61 @@ pi -e ./extensions/pi-lsp
85
87
86
88
## 🛠️ Pi tools
87
89
88
-
### Biome
90
+
### `lsp_diagnostics`
89
91
90
-
-`biome_lsp_diagnostics` — start `biome lsp-proxy`, open supported files, and return diagnostics.
91
-
-`biome_lsp_format` — compute or write formatting edits for one Biome-supported file.
92
-
-`biome_lsp_fix` — compute or write source actions such as `source.fixAll.biome` or `source.organizeImports.biome`.
92
+
Run diagnostics through language/file-extension routes.
93
93
94
-
### Python
94
+
Parameters:
95
95
96
-
-`ty_lsp_diagnostics` — start `ty server`, open Python files, and return type diagnostics.
97
-
-`ruff_lsp_diagnostics` — start `ruff server`, open Python files, and return lint diagnostics.
98
-
-`ruff_lsp_format` — compute or write Ruff formatting edits for one Python file.
99
-
-`ruff_lsp_fix` — compute or write Ruff source actions such as `source.fixAll.ruff` or `source.organizeImports.ruff`.
96
+
-`paths?`: files or directories to check. Defaults to the workspace root.
97
+
-`root?`: workspace root. Defaults to cwd.
98
+
-`limit?`: maximum files to open per selected route.
99
+
-`language?`: optional override, either `"web"` for Biome-supported web/config files or `"python"` for `.py`/`.pyi` files.
100
+
-`checker?`: Python diagnostics checker, one of `"type"`, `"lint"`, or `"all"`. Defaults to `"all"`.
0 commit comments