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 14 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 --stdio

Neovim (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"]
      }
    }
  }
}
  
  
Experimental: The LSP protocol, options, and caching behavior may change between releases, hence the experimental- prefix. The VS Code extension handles version management automatically.

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. See the Configuration page for the full schema.