mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 02:40:09 -04:00
feat!: use tree-sitter build
This commit is contained in:
parent
c17de56890
commit
214cfcf851
13 changed files with 443 additions and 898 deletions
27
.github/workflows/test-queries.yml
vendored
27
.github/workflows/test-queries.yml
vendored
|
|
@ -23,34 +23,11 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-14]
|
os: [ubuntu-latest, windows-latest, macos-14]
|
||||||
cc: [gcc, clang]
|
|
||||||
nvim_tag: [nightly]
|
nvim_tag: [nightly]
|
||||||
exclude:
|
|
||||||
- os: ubuntu-latest
|
|
||||||
cc: clang
|
|
||||||
nvim_tag: nightly
|
|
||||||
|
|
||||||
- os: macos-14
|
|
||||||
cc: gcc
|
|
||||||
nvim_tag: nightly
|
|
||||||
|
|
||||||
- os: windows-latest
|
|
||||||
cc: gcc
|
|
||||||
nvim_tag: nightly
|
|
||||||
|
|
||||||
# include:
|
|
||||||
# - os: windows-latest
|
|
||||||
# cc: cl
|
|
||||||
# nvim_tag: nightly
|
|
||||||
|
|
||||||
# - os: ubuntu-latest
|
|
||||||
# cc: gcc
|
|
||||||
# nvim_tag: nightly
|
|
||||||
|
|
||||||
name: Parser compilation
|
name: Parser compilation
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
env:
|
env:
|
||||||
CC: ${{ matrix.cc }}
|
|
||||||
NVIM: ${{ matrix.os == 'windows-latest' && 'nvim-win64\\bin\\nvim.exe' || 'nvim' }}
|
NVIM: ${{ matrix.os == 'windows-latest' && 'nvim-win64\\bin\\nvim.exe' || 'nvim' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
@ -71,10 +48,8 @@ jobs:
|
||||||
~/.local/share/nvim/site/parser/
|
~/.local/share/nvim/site/parser/
|
||||||
~/AppData/Local/nvim-data/site/parser/
|
~/AppData/Local/nvim-data/site/parser/
|
||||||
key: parsers-${{ join(matrix.*, '-') }}-${{ hashFiles(
|
key: parsers-${{ join(matrix.*, '-') }}-${{ hashFiles(
|
||||||
'./lockfile.json',
|
|
||||||
'./lua/nvim-treesitter/install.lua',
|
'./lua/nvim-treesitter/install.lua',
|
||||||
'./lua/nvim-treesitter/parsers.lua',
|
'./lua/nvim-treesitter/parsers.lua') }}
|
||||||
'./lua/nvim-treesitter/shell_command_selectors.lua') }}
|
|
||||||
|
|
||||||
- name: Compile parsers
|
- name: Compile parsers
|
||||||
run: $NVIM -l ./scripts/install-parsers.lua
|
run: $NVIM -l ./scripts/install-parsers.lua
|
||||||
|
|
|
||||||
14
.github/workflows/tests.yml
vendored
14
.github/workflows/tests.yml
vendored
|
|
@ -20,12 +20,9 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-latest]
|
||||||
cc: [gcc]
|
|
||||||
|
|
||||||
name: Run tests
|
name: Run tests
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
env:
|
|
||||||
CC: ${{ matrix.cc }}
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: tree-sitter/setup-action/cli@v1
|
- uses: tree-sitter/setup-action/cli@v1
|
||||||
|
|
@ -50,16 +47,13 @@ jobs:
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
./parser/
|
~/.local/share/nvim/site/parser/
|
||||||
~/AppData/Local/nvim/pack/nvim-treesitter/start/nvim-treesitter/parser/
|
~/AppData/Local/nvim-data/site/parser/
|
||||||
key: parsers-${{ join(matrix.*, '-') }}-${{ hashFiles(
|
key: parsers-${{ join(matrix.*, '-') }}-${{ hashFiles(
|
||||||
'./lockfile.json',
|
|
||||||
'./lua/nvim-treesitter/install.lua',
|
'./lua/nvim-treesitter/install.lua',
|
||||||
'./lua/nvim-treesitter/parsers.lua',
|
'./lua/nvim-treesitter/parsers.lua') }}
|
||||||
'./lua/nvim-treesitter/shell_selectors.lua') }}
|
|
||||||
|
|
||||||
- name: Compile parsers Unix like
|
- name: Compile parsers
|
||||||
if: ${{ runner.os != 'Windows' && steps.parsers-cache.outputs.cache-hit != 'true' }}
|
|
||||||
run: nvim -l ./scripts/install-parsers.lua
|
run: nvim -l ./scripts/install-parsers.lua
|
||||||
|
|
||||||
- name: Tests
|
- name: Tests
|
||||||
|
|
|
||||||
40
README.md
40
README.md
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
# WARNING
|
# WARNING
|
||||||
|
|
||||||
**This branch is a [full, incompatible, rewrite of `nvim-treesitter`](https://github.com/nvim-treesitter/nvim-treesitter/issues/4767) and [work in progress](TODO.md). This branch REQUIRES (the latest commit on) Neovim `master`.**
|
**This branch is a [full, incompatible, rewrite of `nvim-treesitter`](https://github.com/nvim-treesitter/nvim-treesitter/issues/4767) and [work in progress](TODO.md).** The **stable** branch is [`master`](https://github.com/nvim-treesitter/nvim-treesitter/tree/master).
|
||||||
|
|
||||||
The `nvim-treesitter` plugin provides
|
The `nvim-treesitter` plugin provides
|
||||||
1. functions for installing, updating, and removing [**tree-sitter parsers**](SUPPORTED_LANGUAGES.md);
|
1. functions for installing, updating, and removing [**tree-sitter parsers**](SUPPORTED_LANGUAGES.md);
|
||||||
|
|
@ -29,14 +29,14 @@ The `nvim-treesitter` plugin provides
|
||||||
|
|
||||||
- Neovim 0.10.0 or later (nightly)
|
- Neovim 0.10.0 or later (nightly)
|
||||||
- `tar` and `curl` in your path (or alternatively `git`)
|
- `tar` and `curl` in your path (or alternatively `git`)
|
||||||
- a C compiler in your path and libstdc++ installed ([Windows users please read this!](https://github.com/nvim-treesitter/nvim-treesitter/wiki/Windows-support))
|
- [`tree-sitter`](https://github.com/tree-sitter/tree-sitter) CLI (0.22.6 or later)
|
||||||
- optional: `tree-sitter` CLI and `node`
|
- a C compiler in your path (see <https://docs.rs/cc/latest/cc/#compile-time-requirements>)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
You can install `nvim-treesitter` with your favorite package manager (or using the native `package` feature of vim, see `:h packages`).
|
You can install `nvim-treesitter` with your favorite package manager (or using the native `package` feature of vim, see `:h packages`).
|
||||||
|
|
||||||
**NOTE: This plugin is only guaranteed to work with specific versions of language parsers** (as specified in the `lockfile.json`). **When upgrading the plugin, you must make sure that all installed parsers are updated to the latest version** via `:TSUpdate`.
|
**NOTE: This plugin is only guaranteed to work with specific versions of language parsers** (as specified in the `parser.lua` table). **When upgrading the plugin, you must make sure that all installed parsers are updated to the latest version** via `:TSUpdate`.
|
||||||
It is strongly recommended to automate this; e.g., using [lazy.nvim](https://github.com/folke/lazy.nvim)
|
It is strongly recommended to automate this; e.g., using [lazy.nvim](https://github.com/folke/lazy.nvim)
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
|
|
@ -195,14 +195,6 @@ vim.fn.stdpath('data') .. 'site/queries/zimbu'
|
||||||
Before doing anything, make sure you have the latest version of this plugin and run `:checkhealth nvim-treesitter`.
|
Before doing anything, make sure you have the latest version of this plugin and run `:checkhealth nvim-treesitter`.
|
||||||
It can also help to update the parsers via `:TSUpdate`.
|
It can also help to update the parsers via `:TSUpdate`.
|
||||||
|
|
||||||
#### Feature `{X}` does not work for `{language}`...
|
|
||||||
|
|
||||||
1. Check the `nvim-treesitter` section of `:checkhealth` for any warning, and make sure that the query for `{X}` is listed for `{language}`.
|
|
||||||
|
|
||||||
2. Ensure that the feature is enabled as explained above.
|
|
||||||
|
|
||||||
3. Ensure Neovim is correctly identifying your language's filetype using the `:echo &filetype` command while one of your language's files is open in Neovim.
|
|
||||||
|
|
||||||
#### I get `Error detected while processing .../plugin/nvim-treesitter.vim` every time I open Neovim
|
#### I get `Error detected while processing .../plugin/nvim-treesitter.vim` every time I open Neovim
|
||||||
|
|
||||||
This is probably due to a change in a parser's grammar or its queries.
|
This is probably due to a change in a parser's grammar or its queries.
|
||||||
|
|
@ -221,30 +213,6 @@ or due to an outdated parser.
|
||||||
If you get more than one path, remove the ones that are outside this plugin (`nvim-treesitter` directory),
|
If you get more than one path, remove the ones that are outside this plugin (`nvim-treesitter` directory),
|
||||||
so the correct version of the parser is used.
|
so the correct version of the parser is used.
|
||||||
|
|
||||||
#### I want to use Git instead of curl for downloading the parsers
|
|
||||||
|
|
||||||
In your Lua config:
|
|
||||||
|
|
||||||
```lua
|
|
||||||
require("nvim-treesitter.install").prefer_git = true
|
|
||||||
```
|
|
||||||
|
|
||||||
#### I want to use a HTTP proxy for downloading the parsers
|
|
||||||
|
|
||||||
You can either configure curl to use additional CLI arguments in your Lua config:
|
|
||||||
|
|
||||||
```lua
|
|
||||||
require("nvim-treesitter.install").command_extra_args = {
|
|
||||||
curl = { "--proxy", "<proxy url>" },
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
or you can configure git via `.gitconfig` and use git instead of curl
|
|
||||||
|
|
||||||
```lua
|
|
||||||
require("nvim-treesitter.install").prefer_git = true
|
|
||||||
```
|
|
||||||
|
|
||||||
#### I want to use a mirror instead of "https://github.com/"
|
#### I want to use a mirror instead of "https://github.com/"
|
||||||
|
|
||||||
In your Lua config:
|
In your Lua config:
|
||||||
|
|
|
||||||
|
|
@ -4,293 +4,296 @@ The following is a list of languages for which a parser can be installed through
|
||||||
|
|
||||||
Legend:
|
Legend:
|
||||||
- **Tier:** _stable_, _core_, _community_, or _unsupported_
|
- **Tier:** _stable_, _core_, _community_, or _unsupported_
|
||||||
- **CLI:** `:TSInstall` requires `tree-sitter` CLI installed
|
|
||||||
- **Queries** available for **H**ighlights, **I**ndents, **F**olds, In**J**ections, **L**ocals
|
- **Queries** available for **H**ighlights, **I**ndents, **F**olds, In**J**ections, **L**ocals
|
||||||
|
- **Maintainer** of queries in nvim-treesitter (may be different from parser maintainer!)
|
||||||
|
|
||||||
<!--This section of the README is automatically updated by a CI job-->
|
<!--This section of the README is automatically updated by a CI job-->
|
||||||
<!--parserinfo-->
|
<!--parserinfo-->
|
||||||
Language | Tier | Queries | CLI | Maintainer
|
Language | Tier | Queries | Maintainer
|
||||||
-------- |:----:|:-------:|:---:| ----------
|
-------- |:----:|:-------:| ----------
|
||||||
[ada](https://github.com/briot/tree-sitter-ada) | community | `HF L` | | @briot
|
[ada](https://github.com/briot/tree-sitter-ada) | community | `HF JL` | @briot
|
||||||
[agda](https://github.com/tree-sitter/tree-sitter-agda) | core | `HF ` | | @Decodetalkers
|
[agda](https://github.com/tree-sitter/tree-sitter-agda) | core | `HF J ` | @Decodetalkers
|
||||||
[angular](https://github.com/dlvandenberg/tree-sitter-angular) | community | `HFIJL` | | @dlvandenberg
|
[angular](https://github.com/dlvandenberg/tree-sitter-angular) | community | `HFIJL` | @dlvandenberg
|
||||||
[apex](https://github.com/aheber/tree-sitter-sfapex) | community | `HF L` | | @aheber
|
[apex](https://github.com/aheber/tree-sitter-sfapex) | community | `HF JL` | @aheber
|
||||||
[arduino](https://github.com/tree-sitter-grammars/tree-sitter-arduino) | core | `HFIJL` | | @ObserverOfTime
|
[arduino](https://github.com/tree-sitter-grammars/tree-sitter-arduino) | core | `HFIJL` | @ObserverOfTime
|
||||||
[asm](https://github.com/RubixDev/tree-sitter-asm) | community | `H J ` | | @RubixDev
|
[asm](https://github.com/RubixDev/tree-sitter-asm) | community | `H J ` | @RubixDev
|
||||||
[astro](https://github.com/virchau13/tree-sitter-astro) | community | `HFIJL` | | @virchau13
|
[astro](https://github.com/virchau13/tree-sitter-astro) | community | `HFIJL` | @virchau13
|
||||||
[authzed](https://github.com/mleonidas/tree-sitter-authzed) | community | `H J ` | | @mattpolzin
|
[authzed](https://github.com/mleonidas/tree-sitter-authzed) | community | `H J ` | @mattpolzin
|
||||||
[awk](https://github.com/Beaglefoot/tree-sitter-awk) | unsupported | `H J ` | |
|
[awk](https://github.com/Beaglefoot/tree-sitter-awk) | unsupported | `H J ` |
|
||||||
[bash](https://github.com/tree-sitter/tree-sitter-bash) | stable | `HF JL` | | @TravonteD
|
[bash](https://github.com/tree-sitter/tree-sitter-bash) | stable | `HF JL` | @TravonteD
|
||||||
[bass](https://github.com/vito/tree-sitter-bass) | community | `HFIJL` | | @amaanq
|
[bass](https://github.com/vito/tree-sitter-bass) | community | `HFIJL` | @amaanq
|
||||||
[beancount](https://github.com/polarmutex/tree-sitter-beancount) | community | `HF J ` | | @polarmutex
|
[beancount](https://github.com/polarmutex/tree-sitter-beancount) | community | `HF J ` | @polarmutex
|
||||||
[bibtex](https://github.com/latex-lsp/tree-sitter-bibtex) | community | `HFI ` | | @theHamsta, @clason
|
[bibtex](https://github.com/latex-lsp/tree-sitter-bibtex) | community | `HFIJ ` | @theHamsta, @clason
|
||||||
[bicep](https://github.com/tree-sitter-grammars/tree-sitter-bicep) | core | `HFIJL` | | @amaanq
|
[bicep](https://github.com/tree-sitter-grammars/tree-sitter-bicep) | core | `HFIJL` | @amaanq
|
||||||
[bitbake](https://github.com/tree-sitter-grammars/tree-sitter-bitbake) | core | `HFIJL` | | @amaanq
|
[bitbake](https://github.com/tree-sitter-grammars/tree-sitter-bitbake) | core | `HFIJL` | @amaanq
|
||||||
[blueprint](https://gitlab.com/gabmus/tree-sitter-blueprint) | unsupported | `H ` | | @gabmus
|
[blueprint](https://gitlab.com/gabmus/tree-sitter-blueprint) | unsupported | `H J ` | @gabmus
|
||||||
[c](https://github.com/tree-sitter/tree-sitter-c) | stable | `HFIJL` | | @amaanq
|
[bp](https://github.com/ambroisie/tree-sitter-bp)[^bp] | community | `HFIJL` | @ambroisie
|
||||||
[c_sharp](https://github.com/tree-sitter/tree-sitter-c-sharp) | core | `HF JL` | | @amaanq
|
[c](https://github.com/tree-sitter/tree-sitter-c) | stable | `HFIJL` | @amaanq
|
||||||
[cairo](https://github.com/tree-sitter-grammars/tree-sitter-cairo) | core | `HFIJL` | | @amaanq
|
[c_sharp](https://github.com/tree-sitter/tree-sitter-c-sharp) | core | `HF JL` | @amaanq
|
||||||
[capnp](https://github.com/tree-sitter-grammars/tree-sitter-capnp) | core | `HFIJL` | | @amaanq
|
[cairo](https://github.com/tree-sitter-grammars/tree-sitter-cairo) | core | `HFIJL` | @amaanq
|
||||||
[chatito](https://github.com/tree-sitter-grammars/tree-sitter-chatito) | core | `HFIJL` | | @ObserverOfTime
|
[capnp](https://github.com/tree-sitter-grammars/tree-sitter-capnp) | core | `HFIJL` | @amaanq
|
||||||
[clojure](https://github.com/sogaiu/tree-sitter-clojure) | community | `HF JL` | | @NoahTheDuke
|
[chatito](https://github.com/tree-sitter-grammars/tree-sitter-chatito) | core | `HFIJL` | @ObserverOfTime
|
||||||
[cmake](https://github.com/uyha/tree-sitter-cmake) | community | `HFI ` | | @uyha
|
[clojure](https://github.com/sogaiu/tree-sitter-clojure) | community | `HF JL` | @NoahTheDuke
|
||||||
[comment](https://github.com/stsewd/tree-sitter-comment) | community | `H ` | | @stsewd
|
[cmake](https://github.com/uyha/tree-sitter-cmake) | community | `HFIJ ` | @uyha
|
||||||
[commonlisp](https://github.com/tree-sitter-grammars/tree-sitter-commonlisp) | core | `HF L` | | @theHamsta
|
[comment](https://github.com/stsewd/tree-sitter-comment) | community | `H ` | @stsewd
|
||||||
[cooklang](https://github.com/addcninblue/tree-sitter-cooklang) | community | `H ` | | @addcninblue
|
[commonlisp](https://github.com/tree-sitter-grammars/tree-sitter-commonlisp) | core | `HF JL` | @theHamsta
|
||||||
[corn](https://github.com/jakestanger/tree-sitter-corn) | community | `HFI L` | | @jakestanger
|
[cooklang](https://github.com/addcninblue/tree-sitter-cooklang) | community | `H J ` | @addcninblue
|
||||||
[cpon](https://github.com/tree-sitter-grammars/tree-sitter-cpon) | core | `HFIJL` | | @amaanq
|
[corn](https://github.com/jakestanger/tree-sitter-corn) | community | `HFIJL` | @jakestanger
|
||||||
[cpp](https://github.com/tree-sitter/tree-sitter-cpp) | core | `HFIJL` | | @theHamsta
|
[cpon](https://github.com/tree-sitter-grammars/tree-sitter-cpon) | core | `HFIJL` | @amaanq
|
||||||
[css](https://github.com/tree-sitter/tree-sitter-css) | core | `HFIJ ` | | @TravonteD
|
[cpp](https://github.com/tree-sitter/tree-sitter-cpp) | core | `HFIJL` | @theHamsta
|
||||||
[csv](https://github.com/tree-sitter-grammars/tree-sitter-csv) | core | `H ` | | @amaanq
|
[css](https://github.com/tree-sitter/tree-sitter-css) | core | `HFIJ ` | @TravonteD
|
||||||
[cuda](https://github.com/tree-sitter-grammars/tree-sitter-cuda) | core | `HFIJL` | | @theHamsta
|
[csv](https://github.com/tree-sitter-grammars/tree-sitter-csv) | core | `H ` | @amaanq
|
||||||
[cue](https://github.com/eonpatapon/tree-sitter-cue) | community | `HFIJL` | | @amaanq
|
[cuda](https://github.com/tree-sitter-grammars/tree-sitter-cuda) | core | `HFIJL` | @theHamsta
|
||||||
[d](https://github.com/gdamore/tree-sitter-d) | community | `HFIJL` | | @amaanq
|
[cue](https://github.com/eonpatapon/tree-sitter-cue) | community | `HFIJL` | @amaanq
|
||||||
[dart](https://github.com/UserNobody14/tree-sitter-dart) | community | `HFIJL` | | @akinsho
|
[d](https://github.com/gdamore/tree-sitter-d) | community | `HFIJL` | @amaanq
|
||||||
[devicetree](https://github.com/joelspadin/tree-sitter-devicetree) | community | `HFIJL` | | @jedrzejboczar
|
[dart](https://github.com/UserNobody14/tree-sitter-dart) | community | `HFIJL` | @akinsho
|
||||||
[dhall](https://github.com/jbellerb/tree-sitter-dhall) | community | `HF J ` | | @amaanq
|
[devicetree](https://github.com/joelspadin/tree-sitter-devicetree) | community | `HFIJL` | @jedrzejboczar
|
||||||
[diff](https://github.com/the-mikedavis/tree-sitter-diff) | community | `H ` | | @gbprod
|
[dhall](https://github.com/jbellerb/tree-sitter-dhall) | community | `HF J ` | @amaanq
|
||||||
[disassembly](https://github.com/ColinKennedy/tree-sitter-disassembly) | community | `H J ` | | @ColinKennedy
|
[diff](https://github.com/the-mikedavis/tree-sitter-diff) | community | `H ` | @gbprod
|
||||||
[djot](https://github.com/treeman/tree-sitter-djot) | community | `HFIJL` | | @NoahTheDuke
|
[disassembly](https://github.com/ColinKennedy/tree-sitter-disassembly) | community | `H J ` | @ColinKennedy
|
||||||
[dockerfile](https://github.com/camdencheek/tree-sitter-dockerfile) | community | `H J ` | | @camdencheek
|
[djot](https://github.com/treeman/tree-sitter-djot) | community | `HFIJL` | @NoahTheDuke
|
||||||
[dot](https://github.com/rydesun/tree-sitter-dot) | community | `H IJ ` | | @rydesun
|
[dockerfile](https://github.com/camdencheek/tree-sitter-dockerfile) | community | `H J ` | @camdencheek
|
||||||
[doxygen](https://github.com/tree-sitter-grammars/tree-sitter-doxygen) | core | `H IJ ` | | @amaanq
|
[dot](https://github.com/rydesun/tree-sitter-dot) | community | `H IJ ` | @rydesun
|
||||||
[dtd](https://github.com/tree-sitter-grammars/tree-sitter-xml) | core | `HF JL` | | @ObserverOfTime
|
[doxygen](https://github.com/tree-sitter-grammars/tree-sitter-doxygen) | core | `H IJ ` | @amaanq
|
||||||
[earthfile](https://github.com/glehmann/tree-sitter-earthfile) | community | `H J ` | | @glehmann
|
[dtd](https://github.com/tree-sitter-grammars/tree-sitter-xml) | core | `HF JL` | @ObserverOfTime
|
||||||
[ebnf](https://github.com/RubixDev/ebnf) | community | `H ` | | @RubixDev
|
[earthfile](https://github.com/glehmann/tree-sitter-earthfile) | community | `H J ` | @glehmann
|
||||||
ecma (queries only)[^ecma] | community | `HFIJL` | | @steelsojka
|
[ebnf](https://github.com/RubixDev/ebnf) | community | `H J ` | @RubixDev
|
||||||
[eds](https://github.com/uyha/tree-sitter-eds) | community | `HF ` | | @uyha
|
ecma (queries only)[^ecma] | community | `HFIJL` | @steelsojka
|
||||||
[eex](https://github.com/connorlay/tree-sitter-eex) | community | `H J ` | | @connorlay
|
[eds](https://github.com/uyha/tree-sitter-eds) | community | `HF ` | @uyha
|
||||||
[elixir](https://github.com/elixir-lang/tree-sitter-elixir) | community | `HFIJL` | | @connorlay
|
[eex](https://github.com/connorlay/tree-sitter-eex) | community | `H J ` | @connorlay
|
||||||
[elm](https://github.com/elm-tooling/tree-sitter-elm) | community | `H J ` | | @zweimach
|
[elixir](https://github.com/elixir-lang/tree-sitter-elixir) | community | `HFIJL` | @connorlay
|
||||||
[elsa](https://github.com/glapa-grossklag/tree-sitter-elsa) | community | `HFIJL` | | @glapa-grossklag, @amaanq
|
[elm](https://github.com/elm-tooling/tree-sitter-elm) | community | `H J ` | @zweimach
|
||||||
[elvish](https://github.com/elves/tree-sitter-elvish) | community | `H J ` | | @elves
|
[elsa](https://github.com/glapa-grossklag/tree-sitter-elsa) | community | `HFIJL` | @glapa-grossklag, @amaanq
|
||||||
[embedded_template](https://github.com/tree-sitter/tree-sitter-embedded-template) | unsupported | `H J ` | |
|
[elvish](https://github.com/elves/tree-sitter-elvish) | community | `H J ` | @elves
|
||||||
[erlang](https://github.com/WhatsApp/tree-sitter-erlang) | community | `HF ` | | @filmor
|
[embedded_template](https://github.com/tree-sitter/tree-sitter-embedded-template) | unsupported | `H J ` |
|
||||||
[facility](https://github.com/FacilityApi/tree-sitter-facility) | community | `HFIJ ` | | @bryankenote
|
[erlang](https://github.com/WhatsApp/tree-sitter-erlang) | community | `HF J ` | @filmor
|
||||||
[faust](https://github.com/khiner/tree-sitter-faust) | community | `H J ` | | @khiner
|
[facility](https://github.com/FacilityApi/tree-sitter-facility) | community | `HFIJ ` | @bryankenote
|
||||||
[fennel](https://github.com/alexmozaidze/tree-sitter-fennel) | community | `HF JL` | | @alexmozaidze
|
[faust](https://github.com/khiner/tree-sitter-faust) | community | `H J ` | @khiner
|
||||||
[fidl](https://github.com/google/tree-sitter-fidl) | community | `HF J ` | | @chaopeng
|
[fennel](https://github.com/alexmozaidze/tree-sitter-fennel) | community | `HF JL` | @alexmozaidze
|
||||||
[firrtl](https://github.com/tree-sitter-grammars/tree-sitter-firrtl) | core | `HFIJL` | | @amaanq
|
[fidl](https://github.com/google/tree-sitter-fidl) | community | `HF J ` | @chaopeng
|
||||||
[fish](https://github.com/ram02z/tree-sitter-fish) | community | `HFIJL` | | @ram02z
|
[firrtl](https://github.com/tree-sitter-grammars/tree-sitter-firrtl) | core | `HFIJL` | @amaanq
|
||||||
[foam](https://github.com/FoamScience/tree-sitter-foam) | community | `HFIJL` | | @FoamScience
|
[fish](https://github.com/ram02z/tree-sitter-fish) | community | `HFIJL` | @ram02z
|
||||||
[forth](https://github.com/AlexanderBrevig/tree-sitter-forth) | community | `HFIJL` | | @amaanq
|
[foam](https://github.com/FoamScience/tree-sitter-foam) | community | `HFIJL` | @FoamScience
|
||||||
[fortran](https://github.com/stadelmanma/tree-sitter-fortran) | community | `HFI ` | | @amaanq
|
[forth](https://github.com/AlexanderBrevig/tree-sitter-forth) | community | `HFIJL` | @amaanq
|
||||||
[fsh](https://github.com/mgramigna/tree-sitter-fsh) | community | `H ` | | @mgramigna
|
[fortran](https://github.com/stadelmanma/tree-sitter-fortran) | community | `HFIJ ` | @amaanq
|
||||||
[func](https://github.com/tree-sitter-grammars/tree-sitter-func) | core | `H ` | | @amaanq
|
[fsh](https://github.com/mgramigna/tree-sitter-fsh) | community | `H J ` | @mgramigna
|
||||||
[fusion](https://gitlab.com/jirgn/tree-sitter-fusion) | community | `HFI L` | | @jirgn
|
[func](https://github.com/tree-sitter-grammars/tree-sitter-func) | core | `H J ` | @amaanq
|
||||||
[gdscript](https://github.com/PrestonKnopp/tree-sitter-gdscript)[^gdscript] | community | `HFIJL` | | @PrestonKnopp
|
[fusion](https://gitlab.com/jirgn/tree-sitter-fusion) | community | `HFIJL` | @jirgn
|
||||||
[gdshader](https://github.com/GodOfAvacyn/tree-sitter-gdshader) | community | `H J ` | | @godofavacyn
|
[gdscript](https://github.com/PrestonKnopp/tree-sitter-gdscript)[^gdscript] | community | `HFIJL` | @PrestonKnopp
|
||||||
[git_config](https://github.com/the-mikedavis/tree-sitter-git-config) | community | `HF J ` | | @amaanq
|
[gdshader](https://github.com/GodOfAvacyn/tree-sitter-gdshader) | community | `H J ` | @godofavacyn
|
||||||
[git_rebase](https://github.com/the-mikedavis/tree-sitter-git-rebase) | community | `H J ` | | @gbprod
|
[git_config](https://github.com/the-mikedavis/tree-sitter-git-config) | community | `HF J ` | @amaanq
|
||||||
[gitattributes](https://github.com/tree-sitter-grammars/tree-sitter-gitattributes) | core | `H JL` | | @ObserverOfTime
|
[git_rebase](https://github.com/the-mikedavis/tree-sitter-git-rebase) | community | `H J ` | @gbprod
|
||||||
[gitcommit](https://github.com/gbprod/tree-sitter-gitcommit) | community | `H J ` | | @gbprod
|
[gitattributes](https://github.com/tree-sitter-grammars/tree-sitter-gitattributes) | core | `H JL` | @ObserverOfTime
|
||||||
[gitignore](https://github.com/shunsambongi/tree-sitter-gitignore) | community | `H ` | | @theHamsta
|
[gitcommit](https://github.com/gbprod/tree-sitter-gitcommit) | community | `H J ` | @gbprod
|
||||||
[gleam](https://github.com/gleam-lang/tree-sitter-gleam) | community | `HFIJL` | | @amaanq
|
[gitignore](https://github.com/shunsambongi/tree-sitter-gitignore) | community | `H J ` | @theHamsta
|
||||||
[glimmer](https://github.com/alexlafroscia/tree-sitter-glimmer)[^glimmer] | community | `HFI L` | | @NullVoxPopuli
|
[gleam](https://github.com/gleam-lang/tree-sitter-gleam) | community | `HFIJL` | @amaanq
|
||||||
[glsl](https://github.com/tree-sitter-grammars/tree-sitter-glsl) | core | `HFIJL` | | @theHamsta
|
[glimmer](https://github.com/alexlafroscia/tree-sitter-glimmer)[^glimmer] | community | `HFIJL` | @NullVoxPopuli
|
||||||
[gn](https://github.com/tree-sitter-grammars/tree-sitter-gn) | core | `HFIJL` | | @amaanq
|
[glsl](https://github.com/tree-sitter-grammars/tree-sitter-glsl) | core | `HFIJL` | @theHamsta
|
||||||
[gnuplot](https://github.com/dpezto/tree-sitter-gnuplot) | community | `H J ` | | @dpezto
|
[gn](https://github.com/tree-sitter-grammars/tree-sitter-gn) | core | `HFIJL` | @amaanq
|
||||||
[go](https://github.com/tree-sitter/tree-sitter-go) | core | `HFIJL` | | @theHamsta, @WinWisely268
|
[gnuplot](https://github.com/dpezto/tree-sitter-gnuplot) | community | `H J ` | @dpezto
|
||||||
[godot_resource](https://github.com/PrestonKnopp/tree-sitter-godot-resource)[^godot_resource] | community | `HF JL` | | @pierpo
|
[go](https://github.com/tree-sitter/tree-sitter-go) | core | `HFIJL` | @theHamsta, @WinWisely268
|
||||||
[gomod](https://github.com/camdencheek/tree-sitter-go-mod) | community | `H J ` | | @camdencheek
|
[godot_resource](https://github.com/PrestonKnopp/tree-sitter-godot-resource)[^godot_resource] | community | `HF JL` | @pierpo
|
||||||
[gosum](https://github.com/tree-sitter-grammars/tree-sitter-go-sum) | core | `H ` | | @amaanq
|
[gomod](https://github.com/camdencheek/tree-sitter-go-mod) | community | `H J ` | @camdencheek
|
||||||
[gotmpl](https://github.com/ngalaiko/tree-sitter-go-template) | community | `H J ` | | @qvalentin
|
[gosum](https://github.com/tree-sitter-grammars/tree-sitter-go-sum) | core | `H ` | @amaanq
|
||||||
[gowork](https://github.com/omertuc/tree-sitter-go-work) | community | `H J ` | | @omertuc
|
[gotmpl](https://github.com/ngalaiko/tree-sitter-go-template) | community | `H J ` | @qvalentin
|
||||||
[gpg](https://github.com/tree-sitter-grammars/tree-sitter-gpg-config) | core | `H J ` | | @ObserverOfTime
|
[gowork](https://github.com/omertuc/tree-sitter-go-work) | community | `H J ` | @omertuc
|
||||||
[graphql](https://github.com/bkegley/tree-sitter-graphql) | community | `H IJ ` | | @bkegley
|
[gpg](https://github.com/tree-sitter-grammars/tree-sitter-gpg-config) | core | `H J ` | @ObserverOfTime
|
||||||
[groovy](https://github.com/murtaza64/tree-sitter-groovy) | community | `HFIJL` | | @murtaza64
|
[graphql](https://github.com/bkegley/tree-sitter-graphql) | community | `H IJ ` | @bkegley
|
||||||
[gstlaunch](https://github.com/tree-sitter-grammars/tree-sitter-gstlaunch) | core | `H ` | | @theHamsta
|
[groovy](https://github.com/murtaza64/tree-sitter-groovy) | community | `HFIJL` | @murtaza64
|
||||||
[hack](https://github.com/slackhq/tree-sitter-hack) | unsupported | `H ` | |
|
[gstlaunch](https://github.com/tree-sitter-grammars/tree-sitter-gstlaunch) | core | `H ` | @theHamsta
|
||||||
[hare](https://github.com/tree-sitter-grammars/tree-sitter-hare) | core | `HFIJL` | | @amaanq
|
[hack](https://github.com/slackhq/tree-sitter-hack) | unsupported | `H J ` |
|
||||||
[haskell](https://github.com/tree-sitter/tree-sitter-haskell) | core | `HF JL` | | @mrcjkb
|
[hare](https://github.com/tree-sitter-grammars/tree-sitter-hare) | core | `HFIJL` | @amaanq
|
||||||
[haskell_persistent](https://github.com/MercuryTechnologies/tree-sitter-haskell-persistent) | community | `HF ` | | @lykahb
|
[haskell](https://github.com/tree-sitter/tree-sitter-haskell) | core | `HF JL` | @mrcjkb
|
||||||
[hcl](https://github.com/tree-sitter-grammars/tree-sitter-hcl) | core | `HFIJ ` | | @MichaHoffmann
|
[haskell_persistent](https://github.com/MercuryTechnologies/tree-sitter-haskell-persistent) | community | `HF ` | @lykahb
|
||||||
[heex](https://github.com/connorlay/tree-sitter-heex) | community | `HFIJL` | | @connorlay
|
[hcl](https://github.com/tree-sitter-grammars/tree-sitter-hcl) | core | `HFIJ ` | @MichaHoffmann
|
||||||
[helm](https://github.com/ngalaiko/tree-sitter-go-template) | community | `H J ` | | @qvalentin
|
[heex](https://github.com/connorlay/tree-sitter-heex) | community | `HFIJL` | @connorlay
|
||||||
[hjson](https://github.com/winston0410/tree-sitter-hjson) | community | `HFIJL` | | @winston0410
|
[helm](https://github.com/ngalaiko/tree-sitter-go-template) | community | `H J ` | @qvalentin
|
||||||
[hlsl](https://github.com/tree-sitter-grammars/tree-sitter-hlsl) | core | `HFIJL` | | @theHamsta
|
[hjson](https://github.com/winston0410/tree-sitter-hjson) | community | `HFIJL` | @winston0410
|
||||||
[hlsplaylist](https://github.com/Freed-Wu/tree-sitter-hlsplaylist) | community | `H J ` | | @Freed-Wu
|
[hlsl](https://github.com/tree-sitter-grammars/tree-sitter-hlsl) | core | `HFIJL` | @theHamsta
|
||||||
[hocon](https://github.com/antosha417/tree-sitter-hocon) | unsupported | `HF J ` | | @antosha417
|
[hlsplaylist](https://github.com/Freed-Wu/tree-sitter-hlsplaylist) | community | `H J ` | @Freed-Wu
|
||||||
[hoon](https://github.com/urbit-pilled/tree-sitter-hoon) | community | `HF L` | | @urbit-pilled
|
[hocon](https://github.com/antosha417/tree-sitter-hocon) | unsupported | `HF J ` | @antosha417
|
||||||
[html](https://github.com/tree-sitter/tree-sitter-html) | core | `HFIJL` | | @TravonteD
|
[hoon](https://github.com/urbit-pilled/tree-sitter-hoon) | community | `HF JL` | @urbit-pilled
|
||||||
html_tags (queries only)[^html_tags] | community | `H IJ ` | | @TravonteD
|
[html](https://github.com/tree-sitter/tree-sitter-html) | core | `HFIJL` | @TravonteD
|
||||||
[htmldjango](https://github.com/interdependence/tree-sitter-htmldjango) | community | `HFIJ ` | | @ObserverOfTime
|
html_tags (queries only)[^html_tags] | community | `H IJ ` | @TravonteD
|
||||||
[http](https://github.com/rest-nvim/tree-sitter-http) | community | `H J ` | | @amaanq, @NTBBloodbath
|
[htmldjango](https://github.com/interdependence/tree-sitter-htmldjango) | community | `HFIJ ` | @ObserverOfTime
|
||||||
[hurl](https://github.com/pfeiferj/tree-sitter-hurl) | community | `HFIJ ` | | @pfeiferj
|
[http](https://github.com/rest-nvim/tree-sitter-http) | community | `H J ` | @amaanq, @NTBBloodbath
|
||||||
[hyprlang](https://github.com/tree-sitter-grammars/tree-sitter-hyprlang) | core | `HFIJ ` | | @luckasRanarison
|
[hurl](https://github.com/pfeiferj/tree-sitter-hurl) | community | `HFIJ ` | @pfeiferj
|
||||||
[idl](https://github.com/cathaysia/tree-sitter-idl) | community | `H J ` | | @cathaysa
|
[hyprlang](https://github.com/tree-sitter-grammars/tree-sitter-hyprlang) | core | `HFIJ ` | @luckasRanarison
|
||||||
[ini](https://github.com/justinmk/tree-sitter-ini) | community | `HF ` | | @theHamsta
|
[idl](https://github.com/cathaysia/tree-sitter-idl) | community | `H J ` | @cathaysa
|
||||||
[inko](https://github.com/inko-lang/tree-sitter-inko) | community | `HFIJL` | | @yorickpeterse
|
[ini](https://github.com/justinmk/tree-sitter-ini) | community | `HF ` | @theHamsta
|
||||||
[ispc](https://github.com/tree-sitter-grammars/tree-sitter-ispc) | core | `HFIJL` | | @fab4100
|
[inko](https://github.com/inko-lang/tree-sitter-inko) | community | `HFIJL` | @yorickpeterse
|
||||||
[janet_simple](https://github.com/sogaiu/tree-sitter-janet-simple) | community | `HF JL` | | @sogaiu
|
[ispc](https://github.com/tree-sitter-grammars/tree-sitter-ispc) | core | `HFIJL` | @fab4100
|
||||||
[java](https://github.com/tree-sitter/tree-sitter-java) | core | `HFIJL` | | @p00f
|
[janet_simple](https://github.com/sogaiu/tree-sitter-janet-simple) | community | `HF JL` | @sogaiu
|
||||||
[javascript](https://github.com/tree-sitter/tree-sitter-javascript) | core | `HFIJL` | | @steelsojka
|
[java](https://github.com/tree-sitter/tree-sitter-java) | core | `HFIJL` | @p00f
|
||||||
[jq](https://github.com/flurie/tree-sitter-jq) | community | `H JL` | | @ObserverOfTime
|
[javascript](https://github.com/tree-sitter/tree-sitter-javascript) | core | `HFIJL` | @steelsojka
|
||||||
[jsdoc](https://github.com/tree-sitter/tree-sitter-jsdoc) | core | `H ` | | @steelsojka
|
[jq](https://github.com/flurie/tree-sitter-jq) | community | `H JL` | @ObserverOfTime
|
||||||
[json](https://github.com/tree-sitter/tree-sitter-json) | core | `HFI L` | | @steelsojka
|
[jsdoc](https://github.com/tree-sitter/tree-sitter-jsdoc) | core | `H ` | @steelsojka
|
||||||
[json5](https://github.com/Joakker/tree-sitter-json5) | community | `H J ` | | @Joakker
|
[json](https://github.com/tree-sitter/tree-sitter-json) | core | `HFI L` | @steelsojka
|
||||||
[jsonc](https://gitlab.com/WhyNotHugo/tree-sitter-jsonc) | community | `HFIJL` | | @WhyNotHugo
|
[json5](https://github.com/Joakker/tree-sitter-json5) | community | `H J ` | @Joakker
|
||||||
[jsonnet](https://github.com/sourcegraph/tree-sitter-jsonnet) | community | `HF L` | | @nawordar
|
[jsonc](https://gitlab.com/WhyNotHugo/tree-sitter-jsonc) | community | `HFIJL` | @WhyNotHugo
|
||||||
jsx (queries only)[^jsx] | community | `HFIJ ` | | @steelsojka
|
[jsonnet](https://github.com/sourcegraph/tree-sitter-jsonnet) | community | `HF JL` | @nawordar
|
||||||
[julia](https://github.com/tree-sitter/tree-sitter-julia) | core | `HFIJL` | | @theHamsta
|
jsx (queries only)[^jsx] | community | `HFIJ ` | @steelsojka
|
||||||
[just](https://github.com/IndianBoy42/tree-sitter-just) | community | `HFIJL` | | @Hubro
|
[julia](https://github.com/tree-sitter/tree-sitter-julia) | core | `HFIJL` | @theHamsta
|
||||||
[kconfig](https://github.com/tree-sitter-grammars/tree-sitter-kconfig) | core | `HFIJL` | | @amaanq
|
[just](https://github.com/IndianBoy42/tree-sitter-just) | community | `HFIJL` | @Hubro
|
||||||
[kdl](https://github.com/tree-sitter-grammars/tree-sitter-kdl) | core | `HFIJL` | | @amaanq
|
[kconfig](https://github.com/tree-sitter-grammars/tree-sitter-kconfig) | core | `HFIJL` | @amaanq
|
||||||
[kotlin](https://github.com/fwcd/tree-sitter-kotlin) | community | `HF JL` | | @SalBakraa
|
[kdl](https://github.com/tree-sitter-grammars/tree-sitter-kdl) | core | `HFIJL` | @amaanq
|
||||||
[koto](https://github.com/koto-lang/tree-sitter-koto) | community | `HF JL` | | @irh
|
[kotlin](https://github.com/fwcd/tree-sitter-kotlin) | community | `HF JL` | @SalBakraa
|
||||||
[kusto](https://github.com/Willem-J-an/tree-sitter-kusto) | community | `H J ` | | @Willem-J-an
|
[koto](https://github.com/koto-lang/tree-sitter-koto) | community | `HF JL` | @irh
|
||||||
[lalrpop](https://github.com/traxys/tree-sitter-lalrpop) | community | `HF JL` | | @traxys
|
[kusto](https://github.com/Willem-J-an/tree-sitter-kusto) | community | `H J ` | @Willem-J-an
|
||||||
[latex](https://github.com/latex-lsp/tree-sitter-latex) | community | `HF J ` | ✓ | @theHamsta, @clason
|
[lalrpop](https://github.com/traxys/tree-sitter-lalrpop) | community | `HF JL` | @traxys
|
||||||
[ledger](https://github.com/cbarrete/tree-sitter-ledger) | community | `HFIJ ` | | @cbarrete
|
[latex](https://github.com/latex-lsp/tree-sitter-latex) | community | `HF J ` | @theHamsta, @clason
|
||||||
[leo](https://github.com/r001/tree-sitter-leo) | community | `H IJ ` | | @r001
|
[ledger](https://github.com/cbarrete/tree-sitter-ledger) | community | `HFIJ ` | @cbarrete
|
||||||
[linkerscript](https://github.com/tree-sitter-grammars/tree-sitter-linkerscript) | core | `HFIJL` | | @amaanq
|
[leo](https://github.com/r001/tree-sitter-leo) | community | `H IJ ` | @r001
|
||||||
[liquid](https://github.com/hankthetank27/tree-sitter-liquid) | community | `H J ` | | @hankthetank27
|
[linkerscript](https://github.com/tree-sitter-grammars/tree-sitter-linkerscript) | core | `HFIJL` | @amaanq
|
||||||
[liquidsoap](https://github.com/savonet/tree-sitter-liquidsoap) | community | `HFI L` | | @toots
|
[liquid](https://github.com/hankthetank27/tree-sitter-liquid) | community | `H J ` | @hankthetank27
|
||||||
[llvm](https://github.com/benwilliamgraham/tree-sitter-llvm) | community | `H ` | | @benwilliamgraham
|
[liquidsoap](https://github.com/savonet/tree-sitter-liquidsoap) | community | `HFIJL` | @toots
|
||||||
[lua](https://github.com/tree-sitter-grammars/tree-sitter-lua) | stable | `HFIJL` | | @muniftanjim
|
[llvm](https://github.com/benwilliamgraham/tree-sitter-llvm) | community | `H J ` | @benwilliamgraham
|
||||||
[luadoc](https://github.com/tree-sitter-grammars/tree-sitter-luadoc) | core | `H ` | | @amaanq
|
[lua](https://github.com/tree-sitter-grammars/tree-sitter-lua) | stable | `HFIJL` | @muniftanjim
|
||||||
[luap](https://github.com/tree-sitter-grammars/tree-sitter-luap)[^luap] | core | `H ` | | @amaanq
|
[luadoc](https://github.com/tree-sitter-grammars/tree-sitter-luadoc) | core | `H ` | @amaanq
|
||||||
[luau](https://github.com/tree-sitter-grammars/tree-sitter-luau) | core | `HFIJL` | | @amaanq
|
[luap](https://github.com/tree-sitter-grammars/tree-sitter-luap)[^luap] | core | `H ` | @amaanq
|
||||||
[m68k](https://github.com/grahambates/tree-sitter-m68k) | community | `HF JL` | | @grahambates
|
[luau](https://github.com/tree-sitter-grammars/tree-sitter-luau) | core | `HFIJL` | @amaanq
|
||||||
[make](https://github.com/alemuller/tree-sitter-make) | community | `HF J ` | | @lewis6991
|
[m68k](https://github.com/grahambates/tree-sitter-m68k) | community | `HF JL` | @grahambates
|
||||||
[markdown](https://github.com/tree-sitter-grammars/tree-sitter-markdown)[^markdown] | stable | `HFIJ ` | | @MDeiml
|
[make](https://github.com/alemuller/tree-sitter-make) | community | `HF J ` | @lewis6991
|
||||||
[markdown_inline](https://github.com/tree-sitter-grammars/tree-sitter-markdown)[^markdown_inline] | stable | `H J ` | | @MDeiml
|
[markdown](https://github.com/tree-sitter-grammars/tree-sitter-markdown)[^markdown] | stable | `HFIJ ` | @MDeiml
|
||||||
[matlab](https://github.com/acristoffers/tree-sitter-matlab) | community | `HFIJL` | | @acristoffers
|
[markdown_inline](https://github.com/tree-sitter-grammars/tree-sitter-markdown)[^markdown_inline] | stable | `H J ` | @MDeiml
|
||||||
[menhir](https://github.com/Kerl13/tree-sitter-menhir) | community | `H J ` | | @Kerl13
|
[matlab](https://github.com/acristoffers/tree-sitter-matlab) | community | `HFIJL` | @acristoffers
|
||||||
[mermaid](https://github.com/monaqa/tree-sitter-mermaid) | unsupported | `H ` | |
|
[menhir](https://github.com/Kerl13/tree-sitter-menhir) | community | `H J ` | @Kerl13
|
||||||
[meson](https://github.com/tree-sitter-grammars/tree-sitter-meson) | core | `HFIJ ` | | @Decodetalkers
|
[mermaid](https://github.com/monaqa/tree-sitter-mermaid) | unsupported | `H J ` |
|
||||||
[mlir](https://github.com/artagnon/tree-sitter-mlir) | community | `H L` | ✓ | @artagnon
|
[meson](https://github.com/tree-sitter-grammars/tree-sitter-meson) | core | `HFIJ ` | @Decodetalkers
|
||||||
[muttrc](https://github.com/neomutt/tree-sitter-muttrc) | community | `H J ` | | @Freed-Wu
|
[mlir](https://github.com/artagnon/tree-sitter-mlir) | community | `H JL` | @artagnon
|
||||||
[nasm](https://github.com/naclsn/tree-sitter-nasm) | community | `H J ` | | @ObserverOfTime
|
[muttrc](https://github.com/neomutt/tree-sitter-muttrc) | community | `H J ` | @Freed-Wu
|
||||||
[nickel](https://github.com/nickel-lang/tree-sitter-nickel) | unsupported | `H I ` | |
|
[nasm](https://github.com/naclsn/tree-sitter-nasm) | community | `H J ` | @ObserverOfTime
|
||||||
[nim](https://github.com/alaviss/tree-sitter-nim) | community | `HF JL` | | @aMOPel
|
[nickel](https://github.com/nickel-lang/tree-sitter-nickel) | unsupported | `H IJ ` |
|
||||||
[nim_format_string](https://github.com/aMOPel/tree-sitter-nim-format-string) | community | `H J ` | | @aMOPel
|
[nim](https://github.com/alaviss/tree-sitter-nim) | community | `HF JL` | @aMOPel
|
||||||
[ninja](https://github.com/alemuller/tree-sitter-ninja) | community | `HFI ` | | @alemuller
|
[nim_format_string](https://github.com/aMOPel/tree-sitter-nim-format-string) | community | `H J ` | @aMOPel
|
||||||
[nix](https://github.com/cstrahan/tree-sitter-nix) | community | `HF JL` | | @leo60228
|
[ninja](https://github.com/alemuller/tree-sitter-ninja) | community | `HFIJ ` | @alemuller
|
||||||
[nqc](https://github.com/tree-sitter-grammars/tree-sitter-nqc) | core | `HFIJL` | | @amaanq
|
[nix](https://github.com/cstrahan/tree-sitter-nix) | community | `HF JL` | @leo60228
|
||||||
[objc](https://github.com/tree-sitter-grammars/tree-sitter-objc) | core | `HFIJL` | | @amaanq
|
[nqc](https://github.com/tree-sitter-grammars/tree-sitter-nqc) | core | `HFIJL` | @amaanq
|
||||||
[objdump](https://github.com/ColinKennedy/tree-sitter-objdump) | community | `H J ` | | @ColinKennedy
|
[objc](https://github.com/tree-sitter-grammars/tree-sitter-objc) | core | `HFIJL` | @amaanq
|
||||||
[ocaml](https://github.com/tree-sitter/tree-sitter-ocaml) | core | `HFIJL` | | @undu
|
[objdump](https://github.com/ColinKennedy/tree-sitter-objdump) | community | `H J ` | @ColinKennedy
|
||||||
[ocaml_interface](https://github.com/tree-sitter/tree-sitter-ocaml) | core | `HFIJL` | | @undu
|
[ocaml](https://github.com/tree-sitter/tree-sitter-ocaml) | core | `HFIJL` | @undu
|
||||||
[ocamllex](https://github.com/atom-ocaml/tree-sitter-ocamllex) | community | `H J ` | ✓ | @undu
|
[ocaml_interface](https://github.com/tree-sitter/tree-sitter-ocaml) | core | `HFIJL` | @undu
|
||||||
[odin](https://github.com/tree-sitter-grammars/tree-sitter-odin) | core | `HFIJL` | | @amaanq
|
[ocamllex](https://github.com/atom-ocaml/tree-sitter-ocamllex) | community | `H J ` | @undu
|
||||||
[org](https://github.com/milisims/tree-sitter-org) | unsupported | ` ` | |
|
[odin](https://github.com/tree-sitter-grammars/tree-sitter-odin) | core | `HFIJL` | @amaanq
|
||||||
[pascal](https://github.com/Isopod/tree-sitter-pascal) | community | `HFIJL` | | @Isopod
|
[org](https://github.com/milisims/tree-sitter-org) | unsupported | ` ` |
|
||||||
[passwd](https://github.com/ath3/tree-sitter-passwd) | community | `H ` | | @amaanq
|
[pascal](https://github.com/Isopod/tree-sitter-pascal) | community | `HFIJL` | @Isopod
|
||||||
[pem](https://github.com/tree-sitter-grammars/tree-sitter-pem) | core | `HF J ` | | @ObserverOfTime
|
[passwd](https://github.com/ath3/tree-sitter-passwd) | community | `H ` | @amaanq
|
||||||
[perl](https://github.com/tree-sitter-perl/tree-sitter-perl) | community | `HF J ` | | @RabbiVeesh, @LeoNerd
|
[pem](https://github.com/tree-sitter-grammars/tree-sitter-pem) | core | `HF J ` | @ObserverOfTime
|
||||||
[php](https://github.com/tree-sitter/tree-sitter-php)[^php] | core | `HFIJL` | | @tk-shirasaka
|
[perl](https://github.com/tree-sitter-perl/tree-sitter-perl) | community | `HF J ` | @RabbiVeesh, @LeoNerd
|
||||||
[php_only](https://github.com/tree-sitter/tree-sitter-php)[^php_only] | core | `HFIJL` | | @tk-shirasaka
|
[php](https://github.com/tree-sitter/tree-sitter-php)[^php] | core | `HFIJL` | @tk-shirasaka
|
||||||
[phpdoc](https://github.com/claytonrcarter/tree-sitter-phpdoc) | community | `H ` | | @mikehaertl
|
[php_only](https://github.com/tree-sitter/tree-sitter-php)[^php_only] | core | `HFIJL` | @tk-shirasaka
|
||||||
[pioasm](https://github.com/leo60228/tree-sitter-pioasm) | community | `H J ` | | @leo60228
|
[phpdoc](https://github.com/claytonrcarter/tree-sitter-phpdoc) | community | `H ` | @mikehaertl
|
||||||
[po](https://github.com/tree-sitter-grammars/tree-sitter-po) | core | `HF J ` | | @amaanq
|
[pioasm](https://github.com/leo60228/tree-sitter-pioasm) | community | `H J ` | @leo60228
|
||||||
[pod](https://github.com/tree-sitter-perl/tree-sitter-pod) | community | `H ` | | @RabbiVeesh, @LeoNerd
|
[po](https://github.com/tree-sitter-grammars/tree-sitter-po) | core | `HF J ` | @amaanq
|
||||||
[poe_filter](https://github.com/tree-sitter-grammars/tree-sitter-poe-filter)[^poe_filter] | core | `HFIJ ` | | @ObserverOfTime
|
[pod](https://github.com/tree-sitter-perl/tree-sitter-pod) | community | `H ` | @RabbiVeesh, @LeoNerd
|
||||||
[pony](https://github.com/tree-sitter-grammars/tree-sitter-pony) | core | `HFIJL` | | @amaanq, @mfelsche
|
[poe_filter](https://github.com/tree-sitter-grammars/tree-sitter-poe-filter)[^poe_filter] | core | `HFIJ ` | @ObserverOfTime
|
||||||
[printf](https://github.com/tree-sitter-grammars/tree-sitter-printf) | core | `H ` | | @ObserverOfTime
|
[pony](https://github.com/tree-sitter-grammars/tree-sitter-pony) | core | `HFIJL` | @amaanq, @mfelsche
|
||||||
[prisma](https://github.com/victorhqc/tree-sitter-prisma) | community | `HF ` | | @elianiva
|
[printf](https://github.com/tree-sitter-grammars/tree-sitter-printf) | core | `H ` | @ObserverOfTime
|
||||||
[promql](https://github.com/MichaHoffmann/tree-sitter-promql) | community | `H J ` | | @MichaHoffmann
|
[prisma](https://github.com/victorhqc/tree-sitter-prisma) | community | `HF J ` | @elianiva
|
||||||
[properties](https://github.com/tree-sitter-grammars/tree-sitter-properties)[^properties] | core | `H JL` | | @ObserverOfTime
|
[promql](https://github.com/MichaHoffmann/tree-sitter-promql) | community | `H J ` | @MichaHoffmann
|
||||||
[proto](https://github.com/treywood/tree-sitter-proto) | community | `HF ` | | @treywood
|
[properties](https://github.com/tree-sitter-grammars/tree-sitter-properties)[^properties] | core | `H JL` | @ObserverOfTime
|
||||||
[prql](https://github.com/PRQL/tree-sitter-prql) | community | `H J ` | | @matthias-Q
|
[proto](https://github.com/treywood/tree-sitter-proto) | community | `HF J ` | @treywood
|
||||||
[psv](https://github.com/tree-sitter-grammars/tree-sitter-csv) | core | `H ` | | @amaanq
|
[prql](https://github.com/PRQL/tree-sitter-prql) | community | `H J ` | @matthias-Q
|
||||||
[pug](https://github.com/zealot128/tree-sitter-pug) | community | `H J ` | | @zealot128
|
[psv](https://github.com/tree-sitter-grammars/tree-sitter-csv) | core | `H ` | @amaanq
|
||||||
[puppet](https://github.com/tree-sitter-grammars/tree-sitter-puppet) | core | `HFIJL` | | @amaanq
|
[pug](https://github.com/zealot128/tree-sitter-pug) | community | `H J ` | @zealot128
|
||||||
[purescript](https://github.com/postsolar/tree-sitter-purescript) | community | `H JL` | | @postsolar
|
[puppet](https://github.com/tree-sitter-grammars/tree-sitter-puppet) | core | `HFIJL` | @amaanq
|
||||||
[pymanifest](https://github.com/tree-sitter-grammars/tree-sitter-pymanifest) | core | `H J ` | | @ObserverOfTime
|
[purescript](https://github.com/postsolar/tree-sitter-purescript) | community | `H JL` | @postsolar
|
||||||
[python](https://github.com/tree-sitter/tree-sitter-python) | stable | `HFIJL` | | @stsewd, @theHamsta
|
[pymanifest](https://github.com/tree-sitter-grammars/tree-sitter-pymanifest) | core | `H J ` | @ObserverOfTime
|
||||||
[ql](https://github.com/tree-sitter/tree-sitter-ql) | core | `HFIJL` | | @pwntester
|
[python](https://github.com/tree-sitter/tree-sitter-python) | stable | `HFIJL` | @stsewd, @theHamsta
|
||||||
[qmldir](https://github.com/tree-sitter-grammars/tree-sitter-qmldir) | core | `H J ` | | @amaanq
|
[ql](https://github.com/tree-sitter/tree-sitter-ql) | core | `HFIJL` | @pwntester
|
||||||
[qmljs](https://github.com/yuja/tree-sitter-qmljs) | community | `HF J ` | | @Decodetalkers
|
[qmldir](https://github.com/tree-sitter-grammars/tree-sitter-qmldir) | core | `H J ` | @amaanq
|
||||||
[query](https://github.com/tree-sitter-grammars/tree-sitter-query)[^query] | stable | `HFIJL` | | @steelsojka
|
[qmljs](https://github.com/yuja/tree-sitter-qmljs) | community | `HF J ` | @Decodetalkers
|
||||||
[r](https://github.com/r-lib/tree-sitter-r) | community | `H IJL` | | @echasnovski
|
[query](https://github.com/tree-sitter-grammars/tree-sitter-query)[^query] | stable | `HFIJL` | @steelsojka
|
||||||
[racket](https://github.com/6cdh/tree-sitter-racket) | unsupported | `HF J ` | |
|
[r](https://github.com/r-lib/tree-sitter-r) | community | `H IJL` | @echasnovski
|
||||||
[rasi](https://github.com/Fymyte/tree-sitter-rasi) | community | `HFIJL` | | @Fymyte
|
[racket](https://github.com/6cdh/tree-sitter-racket) | unsupported | `HF J ` |
|
||||||
[rbs](https://github.com/joker1007/tree-sitter-rbs) | community | `HFIJ ` | | @joker1007
|
[ralph](https://github.com/alephium/tree-sitter-ralph) | community | `H J ` | @tdroxler
|
||||||
[re2c](https://github.com/tree-sitter-grammars/tree-sitter-re2c) | core | `HFIJL` | | @amaanq
|
[rasi](https://github.com/Fymyte/tree-sitter-rasi) | community | `HFIJL` | @Fymyte
|
||||||
[readline](https://github.com/tree-sitter-grammars/tree-sitter-readline) | core | `HFIJ ` | | @ribru17
|
[rbs](https://github.com/joker1007/tree-sitter-rbs) | community | `HFIJ ` | @joker1007
|
||||||
[regex](https://github.com/tree-sitter/tree-sitter-regex) | core | `H ` | | @theHamsta
|
[re2c](https://github.com/tree-sitter-grammars/tree-sitter-re2c) | core | `HFIJL` | @amaanq
|
||||||
[rego](https://github.com/FallenAngel97/tree-sitter-rego) | community | `H J ` | | @FallenAngel97
|
[readline](https://github.com/tree-sitter-grammars/tree-sitter-readline) | core | `HFIJ ` | @ribru17
|
||||||
[requirements](https://github.com/tree-sitter-grammars/tree-sitter-requirements) | core | `H J ` | | @ObserverOfTime
|
[regex](https://github.com/tree-sitter/tree-sitter-regex) | core | `H ` | @theHamsta
|
||||||
[rnoweb](https://github.com/bamonroe/tree-sitter-rnoweb) | community | `HF J ` | | @bamonroe
|
[rego](https://github.com/FallenAngel97/tree-sitter-rego) | community | `H J ` | @FallenAngel97
|
||||||
[robot](https://github.com/Hubro/tree-sitter-robot) | community | `HFI ` | | @Hubro
|
[requirements](https://github.com/tree-sitter-grammars/tree-sitter-requirements) | core | `H J ` | @ObserverOfTime
|
||||||
[roc](https://github.com/nat-418/tree-sitter-roc) | community | `H JL` | | @nat-418
|
[rnoweb](https://github.com/bamonroe/tree-sitter-rnoweb) | community | `HF J ` | @bamonroe
|
||||||
[ron](https://github.com/tree-sitter-grammars/tree-sitter-ron) | core | `HFIJL` | | @amaanq
|
[robot](https://github.com/Hubro/tree-sitter-robot) | community | `HFIJ ` | @Hubro
|
||||||
[rst](https://github.com/stsewd/tree-sitter-rst) | community | `H JL` | | @stsewd
|
[roc](https://github.com/faldor20/tree-sitter-roc) | community | `H JL` | @nat-418
|
||||||
[ruby](https://github.com/tree-sitter/tree-sitter-ruby) | core | `HFIJL` | | @TravonteD
|
[ron](https://github.com/tree-sitter-grammars/tree-sitter-ron) | core | `HFIJL` | @amaanq
|
||||||
[rust](https://github.com/tree-sitter/tree-sitter-rust) | core | `HFIJL` | | @amaanq
|
[rst](https://github.com/stsewd/tree-sitter-rst) | community | `H JL` | @stsewd
|
||||||
[scala](https://github.com/tree-sitter/tree-sitter-scala) | core | `HF JL` | | @stevanmilic
|
[ruby](https://github.com/tree-sitter/tree-sitter-ruby) | core | `HFIJL` | @TravonteD
|
||||||
[scfg](https://git.sr.ht/~rockorager/tree-sitter-scfg) | community | `H J ` | ✓ | @WhyNotHugo
|
[rust](https://github.com/tree-sitter/tree-sitter-rust) | core | `HFIJL` | @amaanq
|
||||||
[scheme](https://github.com/6cdh/tree-sitter-scheme) | unsupported | `HF J ` | |
|
[scala](https://github.com/tree-sitter/tree-sitter-scala) | core | `HF JL` | @stevanmilic
|
||||||
[scss](https://github.com/serenadeai/tree-sitter-scss) | community | `HFI ` | | @elianiva
|
[scfg](https://git.sr.ht/~rockorager/tree-sitter-scfg) | unsupported | `H J ` | @WhyNotHugo
|
||||||
[slang](https://github.com/tree-sitter-grammars/tree-sitter-slang)[^slang] | core | `HFIJL` | | @theHamsta
|
[scheme](https://github.com/6cdh/tree-sitter-scheme) | unsupported | `HF J ` |
|
||||||
[slint](https://github.com/slint-ui/tree-sitter-slint) | community | `HFIJL` | | @hunger
|
[scss](https://github.com/serenadeai/tree-sitter-scss) | community | `HFIJ ` | @elianiva
|
||||||
[smali](https://github.com/tree-sitter-grammars/tree-sitter-smali) | core | `HFIJL` | | @amaanq
|
[slang](https://github.com/tree-sitter-grammars/tree-sitter-slang)[^slang] | core | `HFIJL` | @theHamsta
|
||||||
[smithy](https://github.com/indoorvivants/tree-sitter-smithy) | community | `H ` | | @amaanq, @keynmol
|
[slint](https://github.com/slint-ui/tree-sitter-slint) | community | `HFIJL` | @hunger
|
||||||
[snakemake](https://github.com/osthomas/tree-sitter-snakemake) | community | `HFIJL` | | @osthomas
|
[smali](https://github.com/tree-sitter-grammars/tree-sitter-smali) | core | `HFIJL` | @amaanq
|
||||||
[solidity](https://github.com/JoranHonig/tree-sitter-solidity) | community | `HF ` | | @amaanq
|
[smithy](https://github.com/indoorvivants/tree-sitter-smithy) | community | `H J ` | @amaanq, @keynmol
|
||||||
[soql](https://github.com/aheber/tree-sitter-sfapex) | community | `H ` | | @aheber
|
[snakemake](https://github.com/osthomas/tree-sitter-snakemake) | community | `HFIJL` | @osthomas
|
||||||
[sosl](https://github.com/aheber/tree-sitter-sfapex) | community | `H ` | | @aheber
|
[solidity](https://github.com/JoranHonig/tree-sitter-solidity) | community | `HF J ` | @amaanq
|
||||||
[sourcepawn](https://github.com/nilshelmig/tree-sitter-sourcepawn) | community | `H JL` | | @Sarrus1
|
[soql](https://github.com/aheber/tree-sitter-sfapex) | community | `H ` | @aheber
|
||||||
[sparql](https://github.com/BonaBeavis/tree-sitter-sparql) | community | `HFIJL` | | @BonaBeavis
|
[sosl](https://github.com/aheber/tree-sitter-sfapex) | community | `H ` | @aheber
|
||||||
[sql](https://github.com/derekstride/tree-sitter-sql) | community | `H IJ ` | | @derekstride
|
[sourcepawn](https://github.com/nilshelmig/tree-sitter-sourcepawn) | community | `H JL` | @Sarrus1
|
||||||
[squirrel](https://github.com/tree-sitter-grammars/tree-sitter-squirrel) | core | `HFIJL` | | @amaanq
|
[sparql](https://github.com/BonaBeavis/tree-sitter-sparql) | community | `HFIJL` | @BonaBeavis
|
||||||
[ssh_config](https://github.com/tree-sitter-grammars/tree-sitter-ssh-config) | core | `HFIJL` | | @ObserverOfTime
|
[sql](https://github.com/derekstride/tree-sitter-sql) | community | `H IJ ` | @derekstride
|
||||||
[starlark](https://github.com/tree-sitter-grammars/tree-sitter-starlark) | core | `HFIJL` | | @amaanq
|
[squirrel](https://github.com/tree-sitter-grammars/tree-sitter-squirrel) | core | `HFIJL` | @amaanq
|
||||||
[strace](https://github.com/sigmaSd/tree-sitter-strace) | community | `H J ` | | @amaanq
|
[ssh_config](https://github.com/tree-sitter-grammars/tree-sitter-ssh-config) | core | `HFIJL` | @ObserverOfTime
|
||||||
[styled](https://github.com/mskelton/tree-sitter-styled) | community | `HFIJ ` | | @mskelton
|
[starlark](https://github.com/tree-sitter-grammars/tree-sitter-starlark) | core | `HFIJL` | @amaanq
|
||||||
[supercollider](https://github.com/madskjeldgaard/tree-sitter-supercollider) | community | `HFIJL` | | @madskjeldgaard
|
[strace](https://github.com/sigmaSd/tree-sitter-strace) | community | `H J ` | @amaanq
|
||||||
[surface](https://github.com/connorlay/tree-sitter-surface) | community | `HFIJ ` | | @connorlay
|
[styled](https://github.com/mskelton/tree-sitter-styled) | community | `HFIJ ` | @mskelton
|
||||||
[svelte](https://github.com/tree-sitter-grammars/tree-sitter-svelte) | core | `HFIJL` | | @amaanq
|
[supercollider](https://github.com/madskjeldgaard/tree-sitter-supercollider) | community | `HFIJL` | @madskjeldgaard
|
||||||
[swift](https://github.com/alex-pinkus/tree-sitter-swift) | community | `H I L` | ✓ | @alex-pinkus
|
[surface](https://github.com/connorlay/tree-sitter-surface) | community | `HFIJ ` | @connorlay
|
||||||
[sxhkdrc](https://github.com/RaafatTurki/tree-sitter-sxhkdrc) | community | `HF J ` | | @RaafatTurki
|
[svelte](https://github.com/tree-sitter-grammars/tree-sitter-svelte) | core | `HFIJL` | @amaanq
|
||||||
[systemtap](https://github.com/ok-ryoko/tree-sitter-systemtap) | community | `HF JL` | | @ok-ryoko
|
[swift](https://github.com/alex-pinkus/tree-sitter-swift) | community | `H IJL` | @alex-pinkus
|
||||||
[t32](https://gitlab.com/xasc/tree-sitter-t32) | community | `HFIJL` | | @xasc
|
[sxhkdrc](https://github.com/RaafatTurki/tree-sitter-sxhkdrc) | community | `HF J ` | @RaafatTurki
|
||||||
[tablegen](https://github.com/tree-sitter-grammars/tree-sitter-tablegen) | core | `HFIJL` | | @amaanq
|
[systemtap](https://github.com/ok-ryoko/tree-sitter-systemtap) | community | `HF JL` | @ok-ryoko
|
||||||
[tact](https://github.com/tact-lang/tree-sitter-tact) | community | `HFIJL` | | @novusnota
|
[t32](https://gitlab.com/xasc/tree-sitter-t32) | community | `HFIJL` | @xasc
|
||||||
[tcl](https://github.com/tree-sitter-grammars/tree-sitter-tcl) | core | `HFI ` | | @lewis6991
|
[tablegen](https://github.com/tree-sitter-grammars/tree-sitter-tablegen) | core | `HFIJL` | @amaanq
|
||||||
[teal](https://github.com/euclidianAce/tree-sitter-teal) | community | `HFIJL` | ✓ | @euclidianAce
|
[tact](https://github.com/tact-lang/tree-sitter-tact) | community | `HFIJL` | @novusnota
|
||||||
[templ](https://github.com/vrischmann/tree-sitter-templ) | community | `H J ` | | @vrischmann
|
[tcl](https://github.com/tree-sitter-grammars/tree-sitter-tcl) | core | `HFIJ ` | @lewis6991
|
||||||
[terraform](https://github.com/MichaHoffmann/tree-sitter-hcl) | community | `HFIJ ` | | @MichaHoffmann
|
[teal](https://github.com/euclidianAce/tree-sitter-teal) | community | `HFIJL` | @euclidianAce
|
||||||
[textproto](https://github.com/PorterAtGoogle/tree-sitter-textproto) | community | `HFI ` | | @Porter
|
[templ](https://github.com/vrischmann/tree-sitter-templ) | community | `H J ` | @vrischmann
|
||||||
[thrift](https://github.com/tree-sitter-grammars/tree-sitter-thrift) | core | `HFIJL` | | @amaanq, @duskmoon314
|
[terraform](https://github.com/MichaHoffmann/tree-sitter-hcl) | community | `HFIJ ` | @MichaHoffmann
|
||||||
[tiger](https://github.com/ambroisie/tree-sitter-tiger) | community | `HFIJL` | | @ambroisie
|
[textproto](https://github.com/PorterAtGoogle/tree-sitter-textproto) | community | `HFIJ ` | @Porter
|
||||||
[tlaplus](https://github.com/tlaplus-community/tree-sitter-tlaplus) | community | `HF JL` | | @ahelwer, @susliko
|
[thrift](https://github.com/tree-sitter-grammars/tree-sitter-thrift) | core | `HFIJL` | @amaanq, @duskmoon314
|
||||||
[tmux](https://github.com/Freed-Wu/tree-sitter-tmux) | community | `H J ` | | @Freed-Wu
|
[tiger](https://github.com/ambroisie/tree-sitter-tiger) | community | `HFIJL` | @ambroisie
|
||||||
[todotxt](https://github.com/arnarg/tree-sitter-todotxt) | community | `H ` | | @arnarg
|
[tlaplus](https://github.com/tlaplus-community/tree-sitter-tlaplus) | community | `HF JL` | @ahelwer, @susliko
|
||||||
[toml](https://github.com/tree-sitter-grammars/tree-sitter-toml) | core | `HFIJL` | | @tk-shirasaka
|
[tmux](https://github.com/Freed-Wu/tree-sitter-tmux) | community | `H J ` | @Freed-Wu
|
||||||
[tsv](https://github.com/tree-sitter-grammars/tree-sitter-csv) | core | `H ` | | @amaanq
|
[todotxt](https://github.com/arnarg/tree-sitter-todotxt) | community | `H ` | @arnarg
|
||||||
[tsx](https://github.com/tree-sitter/tree-sitter-typescript) | core | `HFIJL` | | @steelsojka
|
[toml](https://github.com/tree-sitter-grammars/tree-sitter-toml) | core | `HFIJL` | @tk-shirasaka
|
||||||
[turtle](https://github.com/BonaBeavis/tree-sitter-turtle) | community | `HFIJL` | | @BonaBeavis
|
[tsv](https://github.com/tree-sitter-grammars/tree-sitter-csv) | core | `H ` | @amaanq
|
||||||
[twig](https://github.com/gbprod/tree-sitter-twig) | community | `H J ` | | @gbprod
|
[tsx](https://github.com/tree-sitter/tree-sitter-typescript) | core | `HFIJL` | @steelsojka
|
||||||
[typescript](https://github.com/tree-sitter/tree-sitter-typescript) | core | `HFIJL` | | @steelsojka
|
[turtle](https://github.com/BonaBeavis/tree-sitter-turtle) | community | `HFIJL` | @BonaBeavis
|
||||||
[typespec](https://github.com/happenslol/tree-sitter-typespec) | community | `H IJ ` | | @happenslol
|
[twig](https://github.com/gbprod/tree-sitter-twig) | community | `H J ` | @gbprod
|
||||||
[typoscript](https://github.com/Teddytrombone/tree-sitter-typoscript) | community | `HFIJ ` | | @Teddytrombone
|
[typescript](https://github.com/tree-sitter/tree-sitter-typescript) | core | `HFIJL` | @steelsojka
|
||||||
[typst](https://github.com/uben0/tree-sitter-typst) | community | `HFIJ ` | | @uben0, @RaafatTurki
|
[typespec](https://github.com/happenslol/tree-sitter-typespec) | community | `H IJ ` | @happenslol
|
||||||
[udev](https://github.com/tree-sitter-grammars/tree-sitter-udev) | core | `H JL` | | @ObserverOfTime
|
[typoscript](https://github.com/Teddytrombone/tree-sitter-typoscript) | community | `HFIJ ` | @Teddytrombone
|
||||||
[ungrammar](https://github.com/tree-sitter-grammars/tree-sitter-ungrammar) | core | `HFIJL` | | @Philipp-M, @amaanq
|
[typst](https://github.com/uben0/tree-sitter-typst) | community | `HFIJ ` | @uben0, @RaafatTurki
|
||||||
[unison](https://github.com/kylegoetz/tree-sitter-unison) | community | `H J ` | ✓ | @tapegram
|
[udev](https://github.com/tree-sitter-grammars/tree-sitter-udev) | core | `H JL` | @ObserverOfTime
|
||||||
[usd](https://github.com/ColinKennedy/tree-sitter-usd) | community | `HFI L` | | @ColinKennedy
|
[ungrammar](https://github.com/tree-sitter-grammars/tree-sitter-ungrammar) | core | `HFIJL` | @Philipp-M, @amaanq
|
||||||
[uxntal](https://github.com/tree-sitter-grammars/tree-sitter-uxntal) | core | `HFIJL` | | @amaanq
|
[unison](https://github.com/kylegoetz/tree-sitter-unison) | community | `H J ` | @tapegram
|
||||||
[v](https://github.com/vlang/v-analyzer) | community | `HFIJL` | | @kkharji, @amaanq
|
[usd](https://github.com/ColinKennedy/tree-sitter-usd) | community | `HFIJL` | @ColinKennedy
|
||||||
[vala](https://github.com/vala-lang/tree-sitter-vala) | community | `HF ` | | @Prince781
|
[uxntal](https://github.com/tree-sitter-grammars/tree-sitter-uxntal) | core | `HFIJL` | @amaanq
|
||||||
[vento](https://github.com/ventojs/tree-sitter-vento) | community | `H J ` | | @wrapperup, @oscarotero
|
[v](https://github.com/vlang/v-analyzer) | community | `HFIJL` | @kkharji, @amaanq
|
||||||
[verilog](https://github.com/tree-sitter/tree-sitter-verilog) | core | `HF JL` | | @zegervdv
|
[vala](https://github.com/vala-lang/tree-sitter-vala) | community | `HF J ` | @Prince781
|
||||||
[vhs](https://github.com/charmbracelet/tree-sitter-vhs) | community | `H ` | | @caarlos0
|
[vento](https://github.com/ventojs/tree-sitter-vento) | community | `H J ` | @wrapperup, @oscarotero
|
||||||
[vim](https://github.com/tree-sitter-grammars/tree-sitter-vim) | stable | `HF JL` | | @clason
|
[verilog](https://github.com/tree-sitter/tree-sitter-verilog) | core | `HF JL` | @zegervdv
|
||||||
[vimdoc](https://github.com/neovim/tree-sitter-vimdoc) | stable | `H J ` | | @clason
|
[vhs](https://github.com/charmbracelet/tree-sitter-vhs) | community | `H J ` | @caarlos0
|
||||||
[vue](https://github.com/tree-sitter-grammars/tree-sitter-vue) | core | `HFIJ ` | | @WhyNotHugo, @lucario387
|
[vim](https://github.com/tree-sitter-grammars/tree-sitter-vim) | stable | `HF JL` | @clason
|
||||||
[wgsl](https://github.com/szebniok/tree-sitter-wgsl) | community | `HFI ` | | @szebniok
|
[vimdoc](https://github.com/neovim/tree-sitter-vimdoc) | stable | `H J ` | @clason
|
||||||
[wgsl_bevy](https://github.com/tree-sitter-grammars/tree-sitter-wgsl-bevy) | core | `HFI ` | | @theHamsta
|
[vue](https://github.com/tree-sitter-grammars/tree-sitter-vue) | core | `HFIJ ` | @WhyNotHugo, @lucario387
|
||||||
[wing](https://github.com/winglang/tree-sitter-wing) | community | `HF L` | | @gshpychka, @MarkMcCulloh
|
[wgsl](https://github.com/szebniok/tree-sitter-wgsl) | community | `HFIJ ` | @szebniok
|
||||||
[wit](https://github.com/liamwh/tree-sitter-wit) | community | `H J ` | | @liamwh
|
[wgsl_bevy](https://github.com/tree-sitter-grammars/tree-sitter-wgsl-bevy) | core | `HFI ` | @theHamsta
|
||||||
[xcompose](https://github.com/tree-sitter-grammars/tree-sitter-xcompose) | core | `H JL` | | @ObserverOfTime
|
[wing](https://github.com/winglang/tree-sitter-wing) | community | `HF JL` | @gshpychka, @MarkMcCulloh
|
||||||
[xml](https://github.com/tree-sitter-grammars/tree-sitter-xml) | core | `HFIJL` | | @ObserverOfTime
|
[wit](https://github.com/liamwh/tree-sitter-wit) | community | `H J ` | @liamwh
|
||||||
[yaml](https://github.com/tree-sitter-grammars/tree-sitter-yaml) | core | `HFIJL` | | @amaanq
|
[xcompose](https://github.com/tree-sitter-grammars/tree-sitter-xcompose) | core | `H JL` | @ObserverOfTime
|
||||||
[yang](https://github.com/Hubro/tree-sitter-yang) | community | `HFIJ ` | | @Hubro
|
[xml](https://github.com/tree-sitter-grammars/tree-sitter-xml) | core | `HFIJL` | @ObserverOfTime
|
||||||
[yuck](https://github.com/tree-sitter-grammars/tree-sitter-yuck) | core | `HFIJL` | | @Philipp-M, @amaanq
|
[yaml](https://github.com/tree-sitter-grammars/tree-sitter-yaml) | core | `HFIJL` | @amaanq
|
||||||
[zathurarc](https://github.com/Freed-Wu/tree-sitter-zathurarc) | community | `H J ` | | @Freed-Wu
|
[yang](https://github.com/Hubro/tree-sitter-yang) | community | `HFIJ ` | @Hubro
|
||||||
[zig](https://github.com/maxxnino/tree-sitter-zig) | community | `HFIJL` | | @maxxnino
|
[yuck](https://github.com/tree-sitter-grammars/tree-sitter-yuck) | core | `HFIJL` | @Philipp-M, @amaanq
|
||||||
|
[zathurarc](https://github.com/Freed-Wu/tree-sitter-zathurarc) | community | `H J ` | @Freed-Wu
|
||||||
|
[zig](https://github.com/maxxnino/tree-sitter-zig) | community | `HFIJL` | @maxxnino
|
||||||
|
[^bp]: Android Blueprint
|
||||||
[^ecma]: queries required by javascript, typescript, tsx, qmljs
|
[^ecma]: queries required by javascript, typescript, tsx, qmljs
|
||||||
[^gdscript]: Godot
|
[^gdscript]: Godot
|
||||||
[^glimmer]: Glimmer and Ember
|
[^glimmer]: Glimmer and Ember
|
||||||
|
|
|
||||||
5
TODO.md
5
TODO.md
|
|
@ -4,12 +4,7 @@ This document lists the planned and finished changes in this rewrite towards [Nv
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
|
|
||||||
- [ ] **`parsers.lua`:** include revision (serialization at home: `vim.inspect`)
|
|
||||||
- rename `parsers` to `languages`
|
|
||||||
- rename `install_info` to `parser`
|
|
||||||
|
|
||||||
- [ ] **`parsers.lua`:** allow specifying version in addition to commit hash (for Tier 1)
|
- [ ] **`parsers.lua`:** allow specifying version in addition to commit hash (for Tier 1)
|
||||||
- [ ] **update-lockfile:** one commit per parser/tier?
|
|
||||||
- [ ] **tests:** fix, update, extend (cover all Tier 1 languages)
|
- [ ] **tests:** fix, update, extend (cover all Tier 1 languages)
|
||||||
- [ ] **documentation:** consolidate, autogenerate?
|
- [ ] **documentation:** consolidate, autogenerate?
|
||||||
- [ ] **documentation:** migration guide
|
- [ ] **documentation:** migration guide
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,6 @@ error('Cannot require a meta file')
|
||||||
---Commit hash of parser to download (compatible with queries)
|
---Commit hash of parser to download (compatible with queries)
|
||||||
---@field revision string
|
---@field revision string
|
||||||
---
|
---
|
||||||
---Files to include when compiling (`src/parser.c` and optionally `src/scanner.c')
|
|
||||||
---@field files string[]
|
|
||||||
---
|
|
||||||
---Branch of parser repo to download (if not default branch)
|
---Branch of parser repo to download (if not default branch)
|
||||||
---@field branch? string
|
---@field branch? string
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -104,15 +104,6 @@ function M.get_available(tier)
|
||||||
languages
|
languages
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
if vim.fn.executable('tree-sitter') == 0 then
|
|
||||||
languages = vim.tbl_filter(
|
|
||||||
--- @param p string
|
|
||||||
function(p)
|
|
||||||
return parsers[p].install_info ~= nil and not parsers[p].install_info.generate
|
|
||||||
end,
|
|
||||||
languages
|
|
||||||
)
|
|
||||||
end
|
|
||||||
return languages
|
return languages
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
local install = require('nvim-treesitter.install')
|
|
||||||
local parsers = require('nvim-treesitter.parsers')
|
local parsers = require('nvim-treesitter.parsers')
|
||||||
local config = require('nvim-treesitter.config')
|
local config = require('nvim-treesitter.config')
|
||||||
local util = require('nvim-treesitter.util')
|
local util = require('nvim-treesitter.util')
|
||||||
|
|
@ -8,82 +7,80 @@ local health = vim.health
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
local NVIM_TREESITTER_MINIMUM_ABI = 13
|
local NVIM_TREESITTER_MINIMUM_ABI = 13
|
||||||
|
local TREE_SITTER_MIN_VER = { 0, 22, 6 }
|
||||||
|
|
||||||
---@return string|nil
|
---@param name string
|
||||||
local function ts_cli_version()
|
---@return table?
|
||||||
if vim.fn.executable('tree-sitter') == 1 then
|
local function check_exe(name)
|
||||||
local result = assert(vim.system({ 'tree-sitter', '-V' }):wait().stdout)
|
if vim.fn.executable(name) == 1 then
|
||||||
return vim.split(result, '\n')[1]:match('[^tree%psitter ].*')
|
local path = vim.fn.exepath(name)
|
||||||
|
local out = vim.trim(vim.fn.system({ name, '--version' }))
|
||||||
|
local version = vim.version.parse(out)
|
||||||
|
return { path = path, version = version, out = out }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function install_health()
|
local function install_health()
|
||||||
health.start('Requirements')
|
health.start('Requirements')
|
||||||
|
|
||||||
if vim.fn.has('nvim-0.10') ~= 1 then
|
do -- nvim check
|
||||||
health.error('Nvim-treesitter requires Neovim Nightly')
|
if vim.fn.has('nvim-0.10') ~= 1 then
|
||||||
|
health.error('Nvim-treesitter requires the latest Neovim nightly')
|
||||||
|
end
|
||||||
|
|
||||||
|
if vim.treesitter.language_version then
|
||||||
|
if vim.treesitter.language_version >= NVIM_TREESITTER_MINIMUM_ABI then
|
||||||
|
health.ok(
|
||||||
|
'Neovim was compiled with tree-sitter runtime ABI version '
|
||||||
|
.. vim.treesitter.language_version
|
||||||
|
.. ' (required >='
|
||||||
|
.. NVIM_TREESITTER_MINIMUM_ABI
|
||||||
|
.. ').'
|
||||||
|
)
|
||||||
|
else
|
||||||
|
health.error(
|
||||||
|
'Neovim was compiled with tree-sitter runtime ABI version '
|
||||||
|
.. vim.treesitter.language_version
|
||||||
|
.. '.\n'
|
||||||
|
.. 'nvim-treesitter expects at least ABI version '
|
||||||
|
.. NVIM_TREESITTER_MINIMUM_ABI
|
||||||
|
.. '\n'
|
||||||
|
.. 'Please make sure that Neovim is linked against a recent tree-sitter library when building'
|
||||||
|
.. ' or raise an issue at your Neovim packager. Parsers must be compatible with runtime ABI.'
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if vim.fn.executable('tree-sitter') == 0 then
|
do -- treesitter check
|
||||||
health.warn(
|
local ts = check_exe('tree-sitter')
|
||||||
'`tree-sitter` executable not found (parser generator, only needed for :TSInstallFromGrammar,'
|
if ts then
|
||||||
.. ' not required for :TSInstall)'
|
if vim.version.ge(ts.version, TREE_SITTER_MIN_VER) then
|
||||||
)
|
health.ok(string.format('tree-sitter %s (%s)', ts.version, ts.path))
|
||||||
else
|
else
|
||||||
health.ok(
|
health.error(
|
||||||
'`tree-sitter` found '
|
string.format('tree-sitter CLI v%d.%d.%d is required', unpack(TREE_SITTER_MIN_VER))
|
||||||
.. (ts_cli_version() or '(unknown version)')
|
)
|
||||||
.. ' (only needed for `:TSInstallFromGrammar`)'
|
end
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
if vim.fn.executable('git') == 0 then
|
|
||||||
health.warn(
|
|
||||||
'`git` executable not found.',
|
|
||||||
'Install it with your package manager and check that your `$PATH` is set correctly.'
|
|
||||||
)
|
|
||||||
else
|
|
||||||
health.ok('`git` executable found.')
|
|
||||||
end
|
|
||||||
|
|
||||||
local cc = install.select_executable(install.compilers)
|
|
||||||
if not cc then
|
|
||||||
health.error('`cc` executable not found.', {
|
|
||||||
'Check that any of '
|
|
||||||
.. table.concat(install.compilers, ', ')
|
|
||||||
.. ' is in your $PATH'
|
|
||||||
.. ' or set `$CC` or `require"nvim-treesitter.install".compilers` explicitly.',
|
|
||||||
})
|
|
||||||
else
|
|
||||||
local version = assert(vim.system({ cc, cc == 'cl' and '' or '--version' }):wait().stdout)
|
|
||||||
health.ok(
|
|
||||||
'`'
|
|
||||||
.. cc
|
|
||||||
.. '` executable found, selected from: '
|
|
||||||
.. table.concat(install.compilers, ', ')
|
|
||||||
.. (version and ('\nVersion: ' .. version) or '')
|
|
||||||
)
|
|
||||||
end
|
|
||||||
if vim.treesitter.language_version then
|
|
||||||
if vim.treesitter.language_version >= NVIM_TREESITTER_MINIMUM_ABI then
|
|
||||||
health.ok(
|
|
||||||
'Neovim was compiled with tree-sitter runtime ABI version '
|
|
||||||
.. vim.treesitter.language_version
|
|
||||||
.. ' (required >='
|
|
||||||
.. NVIM_TREESITTER_MINIMUM_ABI
|
|
||||||
.. ').'
|
|
||||||
)
|
|
||||||
else
|
else
|
||||||
health.error(
|
health.error('tree-sitter CLI not found')
|
||||||
'Neovim was compiled with tree-sitter runtime ABI version '
|
end
|
||||||
.. vim.treesitter.language_version
|
end
|
||||||
.. '.\n'
|
|
||||||
.. 'nvim-treesitter expects at least ABI version '
|
do -- curl+tar or git check
|
||||||
.. NVIM_TREESITTER_MINIMUM_ABI
|
local curl = check_exe('curl')
|
||||||
.. '\n'
|
local tar = check_exe('tar')
|
||||||
.. 'Please make sure that Neovim is linked against a recent tree-sitter library when building'
|
|
||||||
.. ' or raise an issue at your Neovim packager. Parsers must be compatible with runtime ABI.'
|
if curl and tar and vim.uv.os_uname().sysname ~= 'Windows_NT' then
|
||||||
)
|
health.ok(string.format('tar %s (%s)', tar.version, tar.path))
|
||||||
|
health.ok(string.format('curl %s (%s)\n%s', curl.version, curl.path, curl.out))
|
||||||
|
else
|
||||||
|
local git = check_exe('git')
|
||||||
|
if git then
|
||||||
|
health.ok(string.format('git %s (%s)', git.version, git.path))
|
||||||
|
else
|
||||||
|
health.error('Either curl and tar or git must be installed and on `$PATH`')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,19 +23,8 @@ local uv_symlink = a.wrap(uv.fs_symlink, 4)
|
||||||
--- @type fun(path: string): string?
|
--- @type fun(path: string): string?
|
||||||
local uv_unlink = a.wrap(uv.fs_unlink, 2)
|
local uv_unlink = a.wrap(uv.fs_unlink, 2)
|
||||||
|
|
||||||
local M = {}
|
|
||||||
|
|
||||||
local max_jobs = 10
|
local max_jobs = 10
|
||||||
|
|
||||||
local iswin = uv.os_uname().sysname == 'Windows_NT'
|
|
||||||
local ismac = uv.os_uname().sysname == 'Darwin'
|
|
||||||
|
|
||||||
--- @diagnostic disable-next-line:missing-parameter
|
|
||||||
M.compilers = { 'cc', 'gcc', 'clang', 'cl', 'zig' }
|
|
||||||
if uv.os_getenv('CC') then
|
|
||||||
table.insert(M.compilers, 1, uv.os_getenv('CC'))
|
|
||||||
end
|
|
||||||
|
|
||||||
local function system(cmd, opts)
|
local function system(cmd, opts)
|
||||||
log.trace('running job: (cwd=%s) %s', opts.cwd, table.concat(cmd, ' '))
|
log.trace('running job: (cwd=%s) %s', opts.cwd, table.concat(cmd, ' '))
|
||||||
local r = a.wrap(vim.system, 3)(cmd, opts) --[[@as vim.SystemCompleted]]
|
local r = a.wrap(vim.system, 3)(cmd, opts) --[[@as vim.SystemCompleted]]
|
||||||
|
|
@ -50,6 +39,10 @@ local function system(cmd, opts)
|
||||||
return r
|
return r
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local iswin = uv.os_uname().sysname == 'Windows_NT'
|
||||||
|
|
||||||
|
local M = {}
|
||||||
|
|
||||||
---
|
---
|
||||||
--- PARSER INFO
|
--- PARSER INFO
|
||||||
---
|
---
|
||||||
|
|
@ -99,18 +92,6 @@ end
|
||||||
--- PARSER MANAGEMENT FUNCTIONS
|
--- PARSER MANAGEMENT FUNCTIONS
|
||||||
---
|
---
|
||||||
|
|
||||||
local function istring(c)
|
|
||||||
return type(c) == 'string'
|
|
||||||
end
|
|
||||||
|
|
||||||
local function cc_err()
|
|
||||||
log.error(
|
|
||||||
'No C compiler found! "'
|
|
||||||
.. table.concat(vim.tbl_filter(istring, M.compilers), '", "')
|
|
||||||
.. '" are not executable.'
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
--- @param x string
|
--- @param x string
|
||||||
--- @return boolean
|
--- @return boolean
|
||||||
local function executable(x)
|
local function executable(x)
|
||||||
|
|
@ -122,10 +103,6 @@ end
|
||||||
--- @param compile_location string
|
--- @param compile_location string
|
||||||
--- @return string? err
|
--- @return string? err
|
||||||
local function do_generate(logger, repo, compile_location)
|
local function do_generate(logger, repo, compile_location)
|
||||||
if not executable('tree-sitter') then
|
|
||||||
return logger:error('tree-sitter CLI not found: `tree-sitter` is not executable')
|
|
||||||
end
|
|
||||||
|
|
||||||
logger:info(
|
logger:info(
|
||||||
string.format(
|
string.format(
|
||||||
'Generating parser.c from %s...',
|
'Generating parser.c from %s...',
|
||||||
|
|
@ -134,7 +111,7 @@ local function do_generate(logger, repo, compile_location)
|
||||||
)
|
)
|
||||||
|
|
||||||
local r = system({
|
local r = system({
|
||||||
fn.exepath('tree-sitter'),
|
'tree-sitter',
|
||||||
'generate',
|
'generate',
|
||||||
'--no-bindings',
|
'--no-bindings',
|
||||||
'--abi',
|
'--abi',
|
||||||
|
|
@ -232,10 +209,6 @@ end
|
||||||
---@param project_dir string
|
---@param project_dir string
|
||||||
---@return string? err
|
---@return string? err
|
||||||
local function do_download_git(logger, repo, project_name, cache_dir, revision, project_dir)
|
local function do_download_git(logger, repo, project_name, cache_dir, revision, project_dir)
|
||||||
if not executable('git') then
|
|
||||||
return logger:error('git not found!')
|
|
||||||
end
|
|
||||||
|
|
||||||
logger:info('Downloading ' .. project_name .. '...')
|
logger:info('Downloading ' .. project_name .. '...')
|
||||||
|
|
||||||
local r = system({
|
local r = system({
|
||||||
|
|
@ -266,86 +239,6 @@ local function do_download_git(logger, repo, project_name, cache_dir, revision,
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- @type table<string,table<string,boolean>>
|
|
||||||
local cc_args_cache = vim.defaulttable()
|
|
||||||
|
|
||||||
--- @param cc string
|
|
||||||
--- @param arg string
|
|
||||||
--- @return boolean
|
|
||||||
local function test_cc_arg(cc, arg)
|
|
||||||
if cc_args_cache[cc][arg] == nil then
|
|
||||||
cc_args_cache[cc][arg] = system({ cc, '-xc', '-', arg }, {
|
|
||||||
stdin = 'int main(void) { return 0; }',
|
|
||||||
}).code == 0
|
|
||||||
end
|
|
||||||
return cc_args_cache[cc][arg]
|
|
||||||
end
|
|
||||||
|
|
||||||
---@param executables string[]
|
|
||||||
---@return string?
|
|
||||||
function M.select_executable(executables)
|
|
||||||
return vim.tbl_filter(executable, executables)[1]
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Returns the compiler arguments based on the compiler and OS
|
|
||||||
---@param repo InstallInfo
|
|
||||||
---@param compiler string
|
|
||||||
---@return string[]
|
|
||||||
local function select_compiler_args(repo, compiler)
|
|
||||||
if compiler:find('cl$') or compiler:find('cl.exe$') then
|
|
||||||
return {
|
|
||||||
'/Fe:',
|
|
||||||
'parser.so',
|
|
||||||
'/Isrc',
|
|
||||||
repo.files,
|
|
||||||
'-Os',
|
|
||||||
'/utf-8',
|
|
||||||
'/LD',
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
if compiler:find('zig$') or compiler:find('zig.exe$') then
|
|
||||||
return {
|
|
||||||
'cc',
|
|
||||||
'-o',
|
|
||||||
'parser.so',
|
|
||||||
repo.files,
|
|
||||||
'-lc',
|
|
||||||
'-Isrc',
|
|
||||||
'-shared',
|
|
||||||
'-Os',
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
local args = {
|
|
||||||
'-o',
|
|
||||||
'parser.so',
|
|
||||||
'-I./src',
|
|
||||||
repo.files,
|
|
||||||
'-Os',
|
|
||||||
ismac and '-bundle' or '-shared',
|
|
||||||
}
|
|
||||||
|
|
||||||
--- @param arg string
|
|
||||||
local function add_cc_arg(arg)
|
|
||||||
if test_cc_arg(compiler, arg) then
|
|
||||||
args[#args + 1] = arg
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if not iswin then
|
|
||||||
add_cc_arg('-Wall')
|
|
||||||
add_cc_arg('-Wextra')
|
|
||||||
add_cc_arg('-fPIC')
|
|
||||||
|
|
||||||
-- Make sure we don't compile in any unresolved symbols, otherwise nvim will
|
|
||||||
-- just exit (not even crash)
|
|
||||||
add_cc_arg('-Werror=implicit-function-declaration')
|
|
||||||
end
|
|
||||||
|
|
||||||
return args
|
|
||||||
end
|
|
||||||
|
|
||||||
---@param repo InstallInfo
|
---@param repo InstallInfo
|
||||||
---@return boolean
|
---@return boolean
|
||||||
local function can_download_tar(repo)
|
local function can_download_tar(repo)
|
||||||
|
|
@ -355,21 +248,40 @@ local function can_download_tar(repo)
|
||||||
return can_use_tar and (is_github or is_gitlab) and not iswin
|
return can_use_tar and (is_github or is_gitlab) and not iswin
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Returns the compile command based on the OS and user options
|
|
||||||
---@param logger Logger
|
---@param logger Logger
|
||||||
---@param repo InstallInfo
|
|
||||||
---@param cc string
|
|
||||||
---@param compile_location string
|
---@param compile_location string
|
||||||
---@return string? err
|
---@return string? err
|
||||||
local function do_compile(logger, repo, cc, compile_location)
|
local function do_compile(logger, compile_location)
|
||||||
local args = vim.iter(select_compiler_args(repo, cc)):flatten():totable()
|
logger:info(string.format('Compiling parser'))
|
||||||
local cmd = vim.list_extend({ cc }, args)
|
|
||||||
|
|
||||||
logger:info('Compiling parser')
|
local r = system({
|
||||||
|
'tree-sitter',
|
||||||
local r = system(cmd, { cwd = compile_location })
|
'build',
|
||||||
|
'-o',
|
||||||
|
'parser.so',
|
||||||
|
}, { cwd = compile_location })
|
||||||
if r.code > 0 then
|
if r.code > 0 then
|
||||||
return logger:error('Error during compilation: %s', r.stderr)
|
return logger:error('Error during "tree-sitter build": %s', r.stderr)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
---@param logger Logger
|
||||||
|
---@param compile_location string
|
||||||
|
---@param target_location string
|
||||||
|
---@return string? err
|
||||||
|
local function do_install(logger, compile_location, target_location)
|
||||||
|
logger:info(string.format('Installing parser'))
|
||||||
|
|
||||||
|
if iswin then -- why can't you just be normal?!
|
||||||
|
local tempfile = target_location .. tostring(uv.hrtime())
|
||||||
|
uv_rename(target_location, tempfile) -- parser may be in use: rename...
|
||||||
|
uv_unlink(tempfile) -- ...and mark for garbage collection
|
||||||
|
end
|
||||||
|
|
||||||
|
local err = uv_copyfile(compile_location, target_location)
|
||||||
|
a.main()
|
||||||
|
if err then
|
||||||
|
return logger:error('Error during parser installation: %s', err)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -383,12 +295,6 @@ local function install_lang0(lang, cache_dir, install_dir, generate)
|
||||||
|
|
||||||
local repo = get_parser_install_info(lang)
|
local repo = get_parser_install_info(lang)
|
||||||
if repo then
|
if repo then
|
||||||
local cc = M.select_executable(M.compilers)
|
|
||||||
if not cc then
|
|
||||||
cc_err()
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local project_name = 'tree-sitter-' .. lang
|
local project_name = 'tree-sitter-' .. lang
|
||||||
|
|
||||||
local revision = repo.revision
|
local revision = repo.revision
|
||||||
|
|
@ -414,7 +320,7 @@ local function install_lang0(lang, cache_dir, install_dir, generate)
|
||||||
compile_location = fs.joinpath(compile_location, repo.location)
|
compile_location = fs.joinpath(compile_location, repo.location)
|
||||||
end
|
end
|
||||||
|
|
||||||
do
|
do -- generate parser from grammar
|
||||||
if repo.generate or generate then
|
if repo.generate or generate then
|
||||||
local err = do_generate(logger, repo, compile_location)
|
local err = do_generate(logger, repo, compile_location)
|
||||||
if err then
|
if err then
|
||||||
|
|
@ -423,24 +329,25 @@ local function install_lang0(lang, cache_dir, install_dir, generate)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
do
|
do -- compile parser
|
||||||
local err = do_compile(logger, repo, cc, compile_location)
|
local err = do_compile(logger, compile_location)
|
||||||
if err then
|
if err then
|
||||||
return err
|
return err
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local parser_lib_name = fs.joinpath(install_dir, lang) .. '.so'
|
do -- install parser
|
||||||
|
local parser_lib_name = fs.joinpath(compile_location, 'parser.so')
|
||||||
|
local install_location = fs.joinpath(install_dir, lang) .. '.so'
|
||||||
|
local err = do_install(logger, parser_lib_name, install_location)
|
||||||
|
if err then
|
||||||
|
return err
|
||||||
|
end
|
||||||
|
|
||||||
local err = uv_copyfile(fs.joinpath(compile_location, 'parser.so'), parser_lib_name)
|
local revfile = fs.joinpath(config.get_install_dir('parser-info') or '', lang .. '.revision')
|
||||||
a.main()
|
util.write_file(revfile, revision or '')
|
||||||
if err then
|
|
||||||
return logger:error(err)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local revfile = fs.joinpath(config.get_install_dir('parser-info') or '', lang .. '.revision')
|
|
||||||
util.write_file(revfile, revision or '')
|
|
||||||
|
|
||||||
if not repo.path then
|
if not repo.path then
|
||||||
util.delete(fs.joinpath(cache_dir, project_name))
|
util.delete(fs.joinpath(cache_dir, project_name))
|
||||||
end
|
end
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -28,7 +28,7 @@ local filetypes = {
|
||||||
latex = { 'tex' },
|
latex = { 'tex' },
|
||||||
m68k = { 'asm68k' },
|
m68k = { 'asm68k' },
|
||||||
make = { 'automake' },
|
make = { 'automake' },
|
||||||
markdown = { 'pandoc', 'quarto', 'rmd' },
|
markdown = { 'pandoc' },
|
||||||
muttrc = { 'neomuttrc' },
|
muttrc = { 'neomuttrc' },
|
||||||
ocaml_interface = { 'ocamlinterface' },
|
ocaml_interface = { 'ocamlinterface' },
|
||||||
perl = { 'pl' },
|
perl = { 'pl' },
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ local lockfile = vim.json.decode(util.read_file(filename)) --[[@as table<string,
|
||||||
for k, p in pairs(parsers) do
|
for k, p in pairs(parsers) do
|
||||||
if p.install_info then
|
if p.install_info then
|
||||||
p.install_info.revision = lockfile[k].revision
|
p.install_info.revision = lockfile[k].revision
|
||||||
|
p.install_info.files = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,8 @@ table.sort(sorted_parsers, function(a, b)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
local generated_text = [[
|
local generated_text = [[
|
||||||
Language | Tier | Queries | CLI | Maintainer
|
Language | Tier | Queries | Maintainer
|
||||||
-------- |:----:|:-------:|:---:| ----------
|
-------- |:----:|:-------:| ----------
|
||||||
]]
|
]]
|
||||||
local footnotes = ''
|
local footnotes = ''
|
||||||
|
|
||||||
|
|
@ -58,11 +58,6 @@ for _, v in ipairs(sorted_parsers) do
|
||||||
.. (vim.uv.fs_stat('runtime/queries/' .. v.name .. '/locals.scm') and 'L' or ' ')
|
.. (vim.uv.fs_stat('runtime/queries/' .. v.name .. '/locals.scm') and 'L' or ' ')
|
||||||
.. '` | '
|
.. '` | '
|
||||||
|
|
||||||
-- CLI
|
|
||||||
generated_text = generated_text
|
|
||||||
.. (p.install_info and p.install_info.generate and '✓' or '')
|
|
||||||
.. ' | '
|
|
||||||
|
|
||||||
-- Maintainer
|
-- Maintainer
|
||||||
generated_text = generated_text
|
generated_text = generated_text
|
||||||
.. (p.maintainers and table.concat(p.maintainers, ', ') or '')
|
.. (p.maintainers and table.concat(p.maintainers, ', ') or '')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue