vimdoc-language-server 0.1.1

Language server for vim help files
Documentation

vimdoc-language-server

Language server for vim help files.

https://github.com/user-attachments/assets/99ba05f6-9dbf-4645-8491-cf10af208743

Installation

Cargo

cargo install vimdoc-language-server

Nix

nix run github:barrettruth/vimdoc-language-server

From source

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

Usage

Configure vimdoc-language-server in your editor of choice, for example with Neovim:

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

vim.api.nvim_create_autocmd('FileType', {
  pattern = 'help',
  callback = function()
    vim.lsp.start(vim.lsp.config['vimdoc_ls'])
  end,
})

Features

  • Formatting — separator normalization, prose reflow, heading alignment; range formatting supported
  • Diagnostics — duplicate *tag* definitions (same-file and cross-file), unresolved |taglinks|; push, pull, and CLI (check)
  • Completion — tag completion triggered by |, context-aware
  • Hover — tag definition context in a floating window
  • Go-to-definition|tag-ref| to *tag*, same-file and cross-file
  • References — all |taglinks| referencing a *tag*, cross-file
  • Rename — rename a tag and all its references across the workspace
  • Document symbols — all *tag* definitions in the current file
  • Document highlight — highlight all occurrences of a tag under cursor
  • Document links — clickable |taglinks| with tooltip
  • Folding — sections (between separators) and code blocks
  • Code actions — quick fixes and refactors

Acknowledgements

  • @skewb1k - pull diagnostics deduplication fix