Installation

Cargo

cargo install vimdoc-language-server

Nix

Run directly:

nix run github:barrettruth/vimdoc-language-server

Or add to your flake inputs:

inputs.vimdoc-ls.url = "github:barrettruth/vimdoc-language-server";

From source

git clone https://github.com/barrettruth/vimdoc-language-server
cd vimdoc-language-server
cargo install --path .

Editor setup

Neovim

Using the built-in LSP client directly (Neovim nightly required):

vim.lsp.config('vimdoc_ls', {
  cmd = { 'vimdoc-language-server' },
  filetypes = { 'help' },
  root_markers = { 'doc', '.git' },
  workspace_required = false,
})

vim.lsp.enable('vimdoc_ls')

nvim-lspconfig support comes out of the box.

Pass initializationOptions to configure the server:

vim.lsp.config('vimdoc_ls', {
  init_options = {
    lineWidth = 78,
    reflow = 'always',
  },
})

vim.lsp.enable('vimdoc_ls')