lsp tool: offer to install a missing language server
This commit is contained in:
1 parent
ee167ce6ed
commit
ee0714d271
10 files changed
+378
-5
No files matched your search
@@ -38,6 +38,7 @@ tests = "turn_end" # affected tests: turn_end | agent_end | off
|
||||
# extensions = ["zig"]
|
||||
# command = ["zls"]
|
||||
# roots = ["build.zig"]
|
||||
# install = ["brew", "install", "zls"] # offered by the lsp tool when `zls` is missing
|
||||
```
|
||||
|
||||
## Lens
|
||||
@@ -45,7 +46,11 @@ tests = "turn_end" # affected tests: turn_end | agent_end | off
|
||||
After every tool round, hx asks the language server about files the agent wrote or edited and appends
|
||||
errors/warnings to the next request, so the model fixes them without being told. Built in:
|
||||
rust-analyzer, typescript-language-server, pyright, gopls, clangd (used when on `PATH`). The `lsp` tool gives
|
||||
the model diagnostics, definition, references, hover and symbols on demand. `/lsp` in the TUI shows server status,
|
||||
the model diagnostics, definition, references, hover and symbols on demand. If the language server for a file is
|
||||
missing, the `lsp` tool asks you (`[y/n]` in the footer) whether to install it, once per server per session:
|
||||
`rustup component add rust-analyzer`, `npm install -g typescript-language-server typescript`,
|
||||
`npm install -g pyright`, `go install golang.org/x/tools/gopls@latest` (only offered when the installer is on
|
||||
`PATH`; clangd is manual). Custom servers can set `install = ["cmd", "args"]`. Print mode never installs. `/lsp` in the TUI shows server status,
|
||||
missing tools and triage marks.
|
||||
|
||||
Besides the language server, changed files go through (when installed and the project uses them):
|
||||
|
||||
Reference in new issue
Block a user