Editor Integration
Astro Doctor ships an experimental Language Server Protocol (LSP) server that streams diagnostics live into your editor as you type — underlined inline, with rule descriptions on hover and quick-fix actions available from the lightbulb menu.
VS Code & Cursor
Use the VS Code Extension for the native editor experience in VS Code and VS Code-compatible editors such as Cursor. It activates for.astro files, starts the Astro Doctor language server, and wires diagnostics, hovers, quick fixes, status bar updates, and the Health Report sidebar into the editor.
Features
- Inline diagnostics — all 13 rules highlighted as you type
- Hover cards — rule name, category, description, and docs link on hover
- Quick fixes — disable a rule for one line via the lightbulb menu
- Status bar — shows health score and issue counts at a glance
- Sidebar panel — score ring, letter grade, per-category breakdown
Other LSP-capable editors
Any editor that supports LSP can connect directly to the Astro Doctor language server:
astro-doctor experimental-lsp --stdioNeovim (nvim-lspconfig)
require('lspconfig').astro_doctor.setup({
cmd = { 'astro-doctor', 'experimental-lsp', '--stdio' },
filetypes = { 'astro' },
})Zed
// .zed/settings.json
{
"lsp": {
"astro-doctor": {
"binary": {
"path": "astro-doctor",
"arguments": ["experimental-lsp", "--stdio"]
}
}
}
}Rule configuration
The LSP server reads your doctor.config.* file from the workspace root, so all rule overrides, ignore patterns, and thresholds defined there apply to editor diagnostics too. Configuration and workspace manifest changes trigger a fresh scan automatically. Edits use incremental document synchronization and debounced scans so stale results cannot replace newer diagnostics. See the Configuration page for the full schema.