diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2026-01-17 14:41:56 +0100 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2026-01-18 13:55:38 +0100 |
| commit | 1ff6559199d07a2281d387323889bb9deabbf618 (patch) | |
| tree | b2f375a48a16ec68151a0dd285367f9a32f61273 | |
| parent | fix(rust): highlight doc comment markers as @comment.documentation (diff) | |
| download | nvim-treesitter-docs/contrib.tar nvim-treesitter-docs/contrib.tar.gz nvim-treesitter-docs/contrib.tar.bz2 nvim-treesitter-docs/contrib.tar.lz nvim-treesitter-docs/contrib.tar.xz nvim-treesitter-docs/contrib.tar.zst nvim-treesitter-docs/contrib.zip | |
docs(contributing): inclusion criteriadocs/contrib
| -rw-r--r-- | CONTRIBUTING.md | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0dc03947b..52ec52633 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,6 +14,21 @@ Before describing these in detail, some general advice: ## Parsers +>[!IMPORTANT] +> To qualify for inclusion, a parser must meet the following criteria: +> * correspond to a filetype detected by Neovim (nightly) +> * feature complete, tested by users, and actively maintained (according to maintainer discretion) +> * hosted or mirrored on Github (other codeforges are not reliable enough for CI) +> * covered by CI using [upstream workflows](https://github.com/tree-sitter/workflows) +> * provide reference queries covered by a [`ts_query_ls` workflow](https://github.com/tree-sitter-grammars/template/blob/9c46d09d688d27c7aef31c2b32f50260de4e7906/.github/workflows/ci.yml#L69-L86) +> * if the repo contains a `src/parser.c`, it must support the latest ABI +> * if the repo does _not_ contain a `src/parser.c`, it must contain an up-to-date `src/grammar.json` +> * if the repo contains an external scanner, it must be written in C99 +> +> Tier 1 parsers (preferred) in addition need to +> * make regular releases following semver (_patch_ for fixes not affecting queries; _minor_ for changes introducing new nodes or patterns; _major_ for changes removing nodes or previously valid patterns) +> * provide WASM release artifacts + To add a new parser, edit the following files: 1. In `lua/parsers.lua`, add an entry to the returned table of the following form: @@ -37,29 +52,14 @@ zimbu = { ``` >[!IMPORTANT] -> If the repo does not contain a pre-generated `src/parser.c`, it **must** at least contain `src/grammar.json` so that the parser can be generated without having `node` installed. - ->[!IMPORTANT] > The "maintainers" here refers to the person maintaining the **queries** in `nvim-treesitter`, not the parser maintainers (who likely don't use Neovim). The maintainers' duty is to review issues and PRs related to the query and to keep them updated with respect to parser changes. ->[!IMPORTANT] -> Due to reliability issues with smaller codeforges, only Github-hosted parsers are currently eligible for inclusion. (The development may happen elsewhere, but there must at least exist a Github mirror to pull the source from.) We are monitoring the situation and hope to support more codeforges again in the future. - ->[!NOTE] -> To qualify for Tier 1 ("stable"), a parser needs to -> * make releases following semver (_patch_ for fixes not affecting queries; _minor_ for changes introducing new nodes or patterns; _major_ for changes removing nodes or previously valid patterns); -> * provide WASM release artifacts; -> * include and maintain reference queries. - 2. If the parser name is not the same as the Vim filetype, add an entry to the `filetypes` table in `plugin/filetypes.lua`: ```lua zimbu = { 'zu' }, ``` ->[!IMPORTANT] -> Only external scanners written in C are supported for portability reasons. - 3. Update the list of [supported languages] by running `make docs` (or `./scripts/update-readme.lua` if on Windows). 4. Test if both `:TSInstall zimbu` and `:TSInstallFromGrammar zimbu` work without errors (`:checkhealth treesitter` or `./scripts/check-parsers.lua zimbu`). |
