Editors & LSP

mdv lsp brings live diagnostics, hover docs, and completion for mdv directives into VS Code, Neovim, Helix, or any LSP-capable editor.

A good flight deck tells you about the fault while your hand is still on the switch. mdv check is the post-flight report; mdv lsp is the instrument panel — the same validator, wired into your editor, flagging the line as you type it.

mdv lsp --stdio
FeatureWhat you get
Diagnosticsthe mdv check verdicts as you type; contract errors land on the .mdv.md
Grounded ruleschecked live against their sources
Hoversummary, example and link for any directive; how a source is bound
Completiontags, rules, severity overrides, source names, enum values
Go to definition<name> in a mask jumps to its fragment

Grounding reads files only: nothing is fetched or run, so loaders and ground commands stay CLI-only (source-cli-only; mdv sources doctor explains).

Contracts and config resolve per document, as in check (where contracts live); sources: grounded templates.

VS Code

The mediva extension is being rebuilt on the new language server and is not published yet. Until it ships, point any generic LSP client extension at mdv lsp --stdio for Markdown files.

Neovim
vim.lsp.config("mediva", {
  cmd = { "mdv", "lsp", "--stdio" },
  filetypes = { "markdown" },
  root_markers = { "mediva.config.mjs", ".git" },
})
vim.lsp.enable("mediva")
Helix
# ~/.config/helix/languages.toml
[language-server.mediva]
command = "mdv"
args = ["lsp", "--stdio"]

[[language]]
name = "markdown"
language-servers = ["marksman", "mediva"]