LSP Connection
Status: Current Last updated: 2026-04-16 13:37 EDT
The TalkBank extension is powered by a Rust language server (chatter-lsp) that communicates with VS Code over stdio. If the language server fails to start or crashes, most extension features will not work. This chapter covers how to diagnose and fix LSP connection issues.
Checking the Output Panel
The first step for any LSP issue is the Output panel:
- Open the Output panel: View > Output or
Cmd+Shift+U(macOS) /Ctrl+Shift+U(Windows/Linux) - Click the dropdown in the top-right of the Output panel
- Select “TalkBank Language Server”
This shows the LSP communication logs and any server stderr output. Look for:
- Startup messages – the server logs its version and capabilities on startup
- Error messages – parse failures, missing files, or crashes
- Connection lost – if the server crashed, you will see a disconnection message
Binary Not Found
Symptom: The Output panel shows an error about not finding the chatter-lsp binary, or a notification appears with a link to the talkbank.lsp.binaryPath setting.
The extension searches for the language-server binary in this order:
talkbank.lsp.binaryPathsetting – if set and the file exists, used as an explicit override- Bundled binary –
<extension>/server/chatter-lsp[.exe], shipped inside platform-specific VSIXes - System PATH – runs
which chatter-lsp(orwhere chatter-lspon Windows); used by developers who install viacargo install - Dev-tree builds –
<extension>/../target/debug/chatter-lspor.../target/release/chatter-lsp, for contributors running from a cloned workspace - If none are found, an actionable error notification appears with a link to the setting
Fixes:
- Users: install the VSIX that matches your platform (e.g.
talkbank-chat-darwin-arm64.vsix). Each platform-specific VSIX bundles the correct prebuiltchatter-lsp. See Installation. - Developers who installed via Cargo:
cargo install --path crates/chatter-lspand confirmwhich chatter-lspresolves - Contributors running from source:
cargo build --release -p chatter-lspso the dev-tree path exists - Manual override: set
talkbank.lsp.binaryPathin your settings to the absolute path of an existingchatter-lspbinary
Enabling Trace Logging
For detailed server diagnostics, enable trace-level logging:
Server-side logging (RUST_LOG)
Set the RUST_LOG environment variable before launching VS Code:
RUST_LOG=debug code .
Or for more targeted tracing:
RUST_LOG=chatter_lsp=debug code .
RUST_LOG=chatter_lsp::alignment=trace code .
The server uses the tracing crate for structured logging. Trace output appears in the Output panel under “TalkBank Language Server”.
LSP message inspection
To see the raw JSON-RPC messages between VS Code and the server, check whether the extension supports the chatter-lsp.trace.server setting. Set it to "verbose" to log all request/response payloads. Alternatively, use VS Code’s built-in LSP inspector if available.
Server Crash Recovery
The extension automatically restarts the language server if it crashes. You should see a brief interruption in diagnostics and features, followed by automatic recovery.
If the server crashes repeatedly:
- Check the Output panel for the crash message
- Note the file you were editing when the crash occurred
- Try opening a different
.chafile to determine if the crash is file-specific - If the crash is reproducible, file a bug report with:
- The
.chafile that triggers the crash (or a minimal reproduction) - The Output panel log
- The
RUST_LOG=debugoutput
- The
Server Hangs (No Response)
Symptom: The language server appears to be running but features stop responding (no hover, no diagnostics, no completion).
Possible causes:
- Large file parsing. Very large CHAT files (thousands of utterances) can take time to parse. Wait a few seconds after opening or editing.
- Debounce delay. The server debounces validation by 250ms after each edit. During fast typing, diagnostics are intentionally delayed.
- Deadlock. Rare, but possible. Restart VS Code to recover. If reproducible, file a bug report with
RUST_LOG=debugoutput.
Verifying Server Version
To confirm which version of the language server is running, check the Output panel at startup. The server logs its version string. Compare this against the output of:
chatter --version
If the versions do not match, the extension may be using a stale binary. Rebuild or update talkbank.lsp.binaryPath.
Related Chapters
- Common Issues – general troubleshooting
- Settings Reference –
talkbank.lsp.binaryPathsetting - Architecture – how the LSP server works internally