mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
feat(install)!: generate from json instead of requiring node
Problem: Many parsers require node/npm to evaluate the `grammar.js` before being able to generate a parser from it. Solution: Generate from `grammar.json` instead, which is fully resolved. Drops `node` and `npm` as (optional) requirements for nvim-treesitter. Note that this requires parsers to commit the generated json iff the grammar requires evaluation (which is currently the case for all tracked languages).
This commit is contained in:
parent
8f8cf7144d
commit
5a38df5627
10 changed files with 502 additions and 484 deletions
3
.github/workflows/lint.yml
vendored
3
.github/workflows/lint.yml
vendored
|
|
@ -40,12 +40,13 @@ jobs:
|
|||
NVIM_TAG: nightly
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: tree-sitter/setup-action/cli@v1
|
||||
- name: Prepare
|
||||
run: |
|
||||
bash ./scripts/ci-install.sh
|
||||
|
||||
- name: Lint
|
||||
run: |
|
||||
nvim --headless -c "TSInstallSync query" -c "q"
|
||||
nvim -l scripts/install-parsers.lua query
|
||||
nvim -l scripts/format-queries.lua
|
||||
git diff --exit-code
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue