neovim / tree-sitter-vimdoc

Tree-sitter parser for Vim help files
Apache License 2.0
97 stars 13 forks source link
tree-sitter tree-sitter-parser

tree-sitter-vimdoc

This grammar implements the vimdoc "spec" (ref1, ref2). Predictable results are the primary goal, so that output formats (e.g. HTML) are well-formed; the input (vimdoc) is secondary. The first step should always be to try to fix the input rather than insist on a grammar that handles vimdoc's endless quirks.

Overview

Known issues

TODO

Release

Steps to perform a release:

  1. Bump and tag the version:

    First bump Cargo.toml, pyproject.toml, and Makefile to the new version. Then bump the package:

    npm version patch -m "release %s"

    Choose patch/minor/major to indicate query compatibility:

    • patch for bugfixes (no changes to queries needed)
    • minor for added nodes (queries may need changes to use new nodes but will not error)
    • major for removed or renamed nodes (queries will error if not adapted), other breaking changes
  2. Bump to prerelease, without creating a tag:

    npm version --no-git-tag-version prerelease --preid dev
    git add package*.json Cargo.toml pyproject.toml Makefile
    git commit -m bump
  3. Push:

    git push && git push --tags
  4. Release the tagged commit: https://github.com/neovim/tree-sitter-vimdoc/releases/new