Skip to content

Editor integration

sextant-lsp is a Language Server Protocol server that surfaces Sextant findings inside any LSP-capable editor. Squiggles appear as you type (debounced 400ms) and hovering a squiggle pops up the full rule documentation — the same markdown sextant rules explain prints, without the context switch.

WhenModeScope
As you typedid_change (debounced)The current buffer only — overlay text, no on-disk read.
On savedid_saveThe current buffer; cross-file rules get a workspace pass.

LLM-judged rules are off by default in the editor for speed and to avoid surprise API spend. Toggle sextant.disableLlm to false if you want them in the inner loop too.

Cross-file rules (e.g. token-duplication across files, untested public functions in sibling crates) only fire on save through the workspace pass — single-file mode favors latency over coverage.

  • VS Code — first-class extension on the Marketplace.
  • Other editors — Neovim, Helix, and any other LSP client. Point them at sextant-lsp.
  1. Editor opens a file; the LSP client sends initialize with the workspace folder.
  2. sextant-lsp resolves the repo root by looking for .sextant/ or .git/, walking up from the document if no workspace folder was given.
  3. Each did_change schedules a debounced grade. After 400ms with no further keystrokes, the engine grades the in-memory buffer (the file on disk may be stale) and publishes diagnostics.
  4. Each did_save triggers an immediate grade.
  5. textDocument/hover finds findings whose range contains the cursor and renders the rule’s full documentation.

The same .sextant/config.toml and .sextant/rules/**/*.md you’d use for the CLI are picked up automatically. No editor-specific config.

  • Installation — including the sextant-lsp binary.
  • CLI — the same engine for terminal use.
  • MCP server — same engine for AI agents.