/lsp <file> command pulls the real diagnostics for a code file β the same errors and warnings your editor would show β by starting the appropriate language server and speaking the Language Server Protocol with it.
Itβs a manual, per-file command: you pass a file, ChatCLI starts the language server for its language, opens the document, waits for diagnostics and prints them. There is no automatic injection into
/agent//coder.How it works
- Language detection β by file extension.
- Spawn β starts the languageβs server (default command or your override). If the binary isnβt installed/on
PATH,/lspsays so. - Handshake β
initialize+textDocument/didOpen. - Diagnostics β waits up to 12s for
textDocument/publishDiagnosticsand renders the result.
Languages and default commands
Each language uses a conventional stdio command, overridable via an environment variable. The binary must be installed and onPATH.
| Extensions | Language server (default) | Override |
|---|---|---|
.go | gopls | CHATCLI_LSP_GO_CMD |
.py | pyright-langserver --stdio | CHATCLI_LSP_PYTHON_CMD |
.ts .tsx .js .jsx | typescript-language-server --stdio | CHATCLI_LSP_TS_CMD |
.rs | rust-analyzer | CHATCLI_LSP_RUST_CMD |
.c .h | clangd | CHATCLI_LSP_C_CMD |
.cpp .cc | clangd | CHATCLI_LSP_CPP_CMD |
.java | jdtls | CHATCLI_LSP_JAVA_CMD |
.rb | solargraph stdio | CHATCLI_LSP_RUBY_CMD |