get_buf_diagnostics
Retrieve LSP diagnostics for a specific file open in Neovim. Returns errors, warnings, info, and hints with line and column numbers.
Instructions
Get LSP diagnostics for a single Neovim buffer. Read-only.
file: path relative to Neovim's cwd (as shown in get_state buffers).
The buffer must already be open in Neovim; returns an error otherwise.
Use this when you need diagnostics for one specific file. Use
get_all_diagnostics instead for a project-wide overview.
Returns a list of {file, line, col, severity, message, source}. severity is one of "error", "warning", "info", "hint". Returns an empty list when the buffer has no diagnostics.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes |