lsp_diagnostics
Retrieve syntax errors and warnings for Scheme code. Use after edits to catch unmatched brackets and structural issues, for a specific file or all open files.
Instructions
Get diagnostic messages (errors, warnings) from the language server.
When to use: After lsp_change to check for errors, like IDE real-time linting. Also useful before finishing a task to ensure no errors were introduced.
Why this matters for Scheme: S-expressions are catastrophically sensitive to
bracket balance. A single missing or extra parenthesis can render the entire file
unparseable. Diagnostics will catch unmatched brackets, tokenizer errors, and
structural syntax failures with high reliability — things LLMs often miss by eye.
scheme-langserver 2.1.2+ restored clear bracket-mismatch diagnostics
(unclosed parenthesis, unexpected close bracket) in the fault-tolerant tokenizer.
Always pull diagnostics after significant edits.
Confidence: HIGH for basic syntax (brackets, undefined ids). MEDIUM/LOW for semantic errors and implementation-specific extensions (Chez-specific forms may be falsely flagged).
Args: file_path: If provided, returns diagnostics for that file only. If omitted, returns diagnostics for all open files.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||