Merge branch 'main' into fix/nickel-highlights

This commit is contained in:
Salomon Popp 2026-02-22 00:27:20 +01:00 committed by GitHub
commit 723a6c9d33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 519 additions and 170 deletions

View file

@ -8,6 +8,10 @@ on:
- "lua/nvim-treesitter/parsers.lua"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
test-downstream:
name: Check downstream queries

View file

@ -12,7 +12,7 @@ on:
jobs:
lua:
name: Lint Lua files
runs-on: ubuntu-latest
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v6
@ -26,7 +26,7 @@ jobs:
queries:
name: Lint query files
runs-on: ubuntu-latest
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v6
@ -40,7 +40,7 @@ jobs:
readme:
name: Lint docs
runs-on: ubuntu-latest
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v6

View file

@ -15,7 +15,7 @@ jobs:
matrix:
tier: [1, 2]
name: Update parsers tier ${{ matrix.tier }}
runs-on: ubuntu-latest
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v6
with:

View file

@ -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:
@ -36,30 +51,15 @@ 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`).

View file

@ -1,5 +1,5 @@
NVIM_VERSION ?= nightly
LUALS_VERSION := 3.15.0
LUALS_VERSION := 3.17.1
DEPDIR ?= .test-deps
CURL ?= curl -sL --create-dirs

17
SUPPORTED_LANGUAGES.md generated
View file

@ -4,7 +4,7 @@ The following is a list of languages for which a parser can be installed through
Legend:
- **Tier:** _stable_ (updates follow semver releases), _unstable_ (updates follow HEAD), _unmaintained_ (no automatic updates), or _unsupported_ (known to be broken, cannot be installed)
- **Queries** available for **H**ighlights, **I**ndents, **F**olds, In**J**ections, **L**ocals
- **Queries** available for **H**ighlights, **F**olds, **I**ndents, 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-->
@ -28,11 +28,12 @@ Language | Tier | Queries | Maintainer
[bitbake](https://github.com/tree-sitter-grammars/tree-sitter-bitbake) | unstable | `HFIJL` | @amaanq
[blade](https://github.com/EmranMR/tree-sitter-blade) | unstable | `HFIJ ` | @calebdw
[bp](https://github.com/ambroisie/tree-sitter-bp)[^bp] | unstable | `HFIJL` | @ambroisie
[bpftrace](https://github.com/sgruszka/tree-sitter-bpftrace) | unstable | `H  J ` | @sgruszka
[brightscript](https://github.com/ajdelcimmuto/tree-sitter-brightscript) | unstable | `HFIJ ` | @ajdelcimmuto
[c](https://github.com/tree-sitter/tree-sitter-c) | unstable | `HFIJL` | @amaanq
[c3](https://github.com/c3lang/tree-sitter-c3) | unstable | `HFIJ ` | @cbuttner
[c_sharp](https://github.com/tree-sitter/tree-sitter-c-sharp) | unstable | `HF JL` | @amaanq
[caddy](https://github.com/opa-oz/tree-sitter-caddy) | unmaintained | `HFIJ ` | @opa-oz
[caddy](https://github.com/opa-oz/tree-sitter-caddy) | unmaintained | `HFIJ ` |
[cairo](https://github.com/tree-sitter-grammars/tree-sitter-cairo) | unstable | `HFIJL` | @amaanq
[capnp](https://github.com/tree-sitter-grammars/tree-sitter-capnp) | unstable | `HFIJL` | @amaanq
[chatito](https://github.com/tree-sitter-grammars/tree-sitter-chatito) | unstable | `HFIJL` | @ObserverOfTime
@ -158,7 +159,7 @@ jsx (queries only)[^jsx] | unstable | `HFIJ ` | @steelsojka
[kdl](https://github.com/tree-sitter-grammars/tree-sitter-kdl) | unstable | `HFIJL` | @amaanq
[kitty](https://github.com/OXY2DEV/tree-sitter-kitty) | unstable | `H  J ` | @OXY2DEV
[kos](https://github.com/kos-lang/tree-sitter-kos) | unstable | `HF JL` | @cdragan
[kotlin](https://github.com/fwcd/tree-sitter-kotlin) | unstable | `HF JL` | @SalBakraa
[kotlin](https://github.com/fwcd/tree-sitter-kotlin) | unstable | `HF JL` |
[koto](https://github.com/koto-lang/tree-sitter-koto) | unstable | `HF JL` | @irh
[kusto](https://github.com/Willem-J-an/tree-sitter-kusto) | unstable | `H  J ` | @Willem-J-an
[lalrpop](https://github.com/traxys/tree-sitter-lalrpop) | unstable | `HF JL` | @traxys
@ -174,7 +175,7 @@ jsx (queries only)[^jsx] | unstable | `HFIJ ` | @steelsojka
[luap](https://github.com/tree-sitter-grammars/tree-sitter-luap)[^luap] | unstable | `H    ` | @amaanq
[luau](https://github.com/tree-sitter-grammars/tree-sitter-luau) | unstable | `HFIJL` | @amaanq
[m68k](https://github.com/grahambates/tree-sitter-m68k) | unstable | `HF JL` | @grahambates
[make](https://github.com/alemuller/tree-sitter-make) | unstable | `HF J ` | @lewis6991
[make](https://github.com/tree-sitter-grammars/tree-sitter-make) | unstable | `HF J ` | @lewis6991
[markdown](https://github.com/tree-sitter-grammars/tree-sitter-markdown)[^markdown] | unstable | `HFIJ ` | @MDeiml
[markdown_inline](https://github.com/tree-sitter-grammars/tree-sitter-markdown)[^markdown_inline] | unstable | `H  J ` | @MDeiml
[matlab](https://github.com/acristoffers/tree-sitter-matlab) | unstable | `HFIJL` | @acristoffers
@ -218,7 +219,7 @@ jsx (queries only)[^jsx] | unstable | `HFIJ ` | @steelsojka
[prolog](https://github.com/foxyseta/tree-sitter-prolog) | unstable | `HFIJ ` | @foxyseta
[promql](https://github.com/MichaHoffmann/tree-sitter-promql) | unstable | `H  J ` | @MichaHoffmann
[properties](https://github.com/tree-sitter-grammars/tree-sitter-properties)[^properties] | unstable | `H  JL` | @ObserverOfTime
[proto](https://github.com/treywood/tree-sitter-proto) | unstable | `HFIJ ` | @treywood
[proto](https://github.com/coder3101/tree-sitter-proto) | unstable | `HFIJ ` | @stefanvanburen
[prql](https://github.com/PRQL/tree-sitter-prql) | unstable | `H  J ` | @matthias-Q
[psv](https://github.com/tree-sitter-grammars/tree-sitter-csv) | unstable | `H    ` | @amaanq
[pug](https://github.com/zealot128/tree-sitter-pug) | unstable | `H  J ` | @zealot128
@ -246,7 +247,7 @@ jsx (queries only)[^jsx] | unstable | `HFIJ ` | @steelsojka
[rnoweb](https://github.com/bamonroe/tree-sitter-rnoweb) | unstable | `HF J ` | @bamonroe
[robot](https://github.com/Hubro/tree-sitter-robot) | unstable | `HFIJ ` | @Hubro
[robots_txt](https://github.com/opa-oz/tree-sitter-robots-txt) | unstable | `H  J ` | @opa-oz
[roc](https://github.com/faldor20/tree-sitter-roc) | unstable | `H IJL` | @nat-418
[roc](https://github.com/faldor20/tree-sitter-roc) | unmaintained | `H IJL` |
[ron](https://github.com/tree-sitter-grammars/tree-sitter-ron) | unstable | `HFIJL` | @amaanq
[rst](https://github.com/stsewd/tree-sitter-rst) | unstable | `H  JL` | @stsewd
[ruby](https://github.com/tree-sitter/tree-sitter-ruby) | unstable | `HFIJL` | @TravonteD
@ -276,7 +277,7 @@ jsx (queries only)[^jsx] | unstable | `HFIJ ` | @steelsojka
[starlark](https://github.com/tree-sitter-grammars/tree-sitter-starlark) | unstable | `HFIJL` | @amaanq
[strace](https://github.com/sigmaSd/tree-sitter-strace) | unstable | `H  J ` | @amaanq
[styled](https://github.com/mskelton/tree-sitter-styled) | unstable | `HFIJ ` | @mskelton
[supercollider](https://github.com/madskjeldgaard/tree-sitter-supercollider) | unstable | `HFIJL` | @madskjeldgaard
[supercollider](https://github.com/madskjeldgaard/tree-sitter-supercollider) | unmaintained | `HFIJL` | @madskjeldgaard
[superhtml](https://github.com/kristoff-it/superhtml) | unstable | `H  J ` | @rockorager
[surface](https://github.com/connorlay/tree-sitter-surface) | unstable | `HFIJ ` | @connorlay
[svelte](https://github.com/tree-sitter-grammars/tree-sitter-svelte) | unstable | `HFIJL` | @amaanq
@ -315,7 +316,7 @@ jsx (queries only)[^jsx] | unstable | `HFIJ ` | @steelsojka
[uxntal](https://github.com/tree-sitter-grammars/tree-sitter-uxntal) | unstable | `HFIJL` | @amaanq
[v](https://github.com/vlang/v-analyzer) | unstable | `HFIJL` | @kkharji, @amaanq
[vala](https://github.com/vala-lang/tree-sitter-vala) | unstable | `HF J ` | @Prince781
[vento](https://github.com/ventojs/tree-sitter-vento) | unstable | `H  J ` | @wrapperup, @oscarotero
[vento](https://github.com/ventojs/tree-sitter-vento) | unmaintained | `H  J ` |
[vhdl](https://github.com/jpt13653903/tree-sitter-vhdl) | unstable | `HF J ` | @jpt13653903
[vhs](https://github.com/charmbracelet/tree-sitter-vhs) | unstable | `H  J ` | @caarlos0
[vim](https://github.com/tree-sitter-grammars/tree-sitter-vim) | unstable | `HF JL` | @clason

View file

@ -16,7 +16,7 @@ function M.setup(user_data)
if user_data then
if user_data.install_dir then
user_data.install_dir = vim.fs.normalize(user_data.install_dir)
vim.opt.runtimepath:prepend(user_data.install_dir)
vim.o.rtp = user_data.install_dir .. ',' .. vim.o.rtp
end
config = vim.tbl_deep_extend('force', config, user_data)
end

View file

@ -7,7 +7,7 @@ local health = vim.health
local M = {}
local NVIM_TREESITTER_MINIMUM_ABI = 13
local TREE_SITTER_MIN_VER = { 0, 25, 0 }
local TREE_SITTER_MIN_VER = { 0, 26, 1 }
---@param name string
---@return table?
@ -148,7 +148,7 @@ function M.check()
end
health.info(vim.fn.trim(out, ' ', 2))
end
health.start(' Legend: H[ighlights], L[ocals], F[olds], I[ndents], In[J]ections')
health.start(' Legend: [H]ighlights, [L]ocals, [F]olds, [I]ndents, In[J]ections')
if #error_collection > 0 then
health.start('The following errors have been detected in query files:')

View file

@ -197,17 +197,13 @@ end
---@param output_dir string
---@return string? err
local function do_download(logger, url, project_name, cache_dir, revision, output_dir)
local is_gitlab = url:find('gitlab.com', 1, true)
local tmp = output_dir .. '-tmp'
rmpath(tmp)
a.schedule()
url = url:gsub('.git$', '')
local target = is_gitlab
and string.format('%s/-/archive/%s/%s-%s.tar.gz', url, revision, project_name, revision)
or string.format('%s/archive/%s.tar.gz', url, revision)
local target = string.format('%s/archive/%s.tar.gz', url, revision)
local tarball_path = fs.joinpath(cache_dir, project_name .. '.tar.gz')
@ -218,6 +214,8 @@ local function do_download(logger, url, project_name, cache_dir, revision, outpu
'--silent',
'--fail',
'--show-error',
'--retry',
'7',
'-L', -- follow redirects
target,
'--output',
@ -304,6 +302,8 @@ local function do_install(logger, compile_location, target_location)
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
else
uv_unlink(target_location) -- don't disturb existing memory-mapped content
end
local err = uv_copyfile(compile_location, target_location)

View file

@ -18,7 +18,7 @@ return {
},
angular = {
install_info = {
revision = '3bd2036e710f609ea08fcfca5a1eb1169ecc114f',
revision = 'f0d0685701b70883fa2dfe94ee7dc27965cab841',
url = 'https://github.com/dlvandenberg/tree-sitter-angular',
},
maintainers = { '@dlvandenberg' },
@ -93,7 +93,7 @@ return {
},
beancount = {
install_info = {
revision = '653cce316fbff8d212a2488ae13df648efb542a4',
revision = 'd7a03a7506fbbbc4b16a9a2054ff7c2b337744b8',
url = 'https://github.com/polarmutex/tree-sitter-beancount',
},
maintainers = { '@polarmutex' },
@ -140,6 +140,14 @@ return {
readme_note = 'Android Blueprint',
tier = 2,
},
bpftrace = {
install_info = {
revision = '774f4458ad39691336ead1ee361b22434c4cdec7',
url = 'https://github.com/sgruszka/tree-sitter-bpftrace',
},
maintainers = { '@sgruszka' },
tier = 2,
},
brightscript = {
install_info = {
revision = '253fdfaa23814cb46c2d5fc19049fa0f2f62c6da',
@ -158,7 +166,7 @@ return {
},
c3 = {
install_info = {
revision = '805f776dcfbfef5c9baf4270ec942b3e8dc7ff16',
revision = '302fab443c2237e3b8fb3e991454db0e442af130',
url = 'https://github.com/c3lang/tree-sitter-c3',
},
maintainers = { '@cbuttner' },
@ -166,7 +174,7 @@ return {
},
c_sharp = {
install_info = {
revision = '485f0bae0274ac9114797fc10db6f7034e4086e3',
revision = '88366631d598ce6595ec655ce1591b315cffb14c',
url = 'https://github.com/tree-sitter/tree-sitter-c-sharp',
},
maintainers = { '@amaanq' },
@ -177,7 +185,6 @@ return {
revision = '2686186edb61be47960431c93a204fb249681360',
url = 'https://github.com/opa-oz/tree-sitter-caddy',
},
maintainers = { '@opa-oz' },
tier = 3,
},
cairo = {
@ -330,7 +337,7 @@ return {
},
dart = {
install_info = {
revision = 'd4d8f3e337d8be23be27ffc35a0aef972343cd54',
revision = '81638dbbdb76a0e88ea8c31b95ec76b9625ddb84',
url = 'https://github.com/UserNobody14/tree-sitter-dart',
},
maintainers = { '@akinsho' },
@ -338,7 +345,7 @@ return {
},
desktop = {
install_info = {
revision = 'c0279c1fb1e2e1f06f374437815d4abda02e30b2',
revision = '4a99354f8e9bb7270586f6f539130c74e59cafdd',
url = 'https://github.com/ValdezFOmar/tree-sitter-desktop',
},
maintainers = { '@ValdezFOmar' },
@ -411,7 +418,7 @@ return {
dtd = {
install_info = {
location = 'dtd',
revision = '863dbc381f44f6c136a399e684383b977bb2beaa',
revision = '5000ae8f22d11fbe93939b05c1e37cf21117162d',
url = 'https://github.com/tree-sitter-grammars/tree-sitter-xml',
},
maintainers = { '@ObserverOfTime' },
@ -441,7 +448,7 @@ return {
},
editorconfig = {
install_info = {
revision = 'f8e8a4cefe4de5d7e87bd129f3a69bdcdf73eebe',
revision = '406ab80f7dc4f3aac252ad3d106737a621dde47d',
url = 'https://github.com/ValdezFOmar/tree-sitter-editorconfig',
},
maintainers = { '@ValdezFOmar' },
@ -536,7 +543,7 @@ return {
},
fennel = {
install_info = {
revision = 'fd4a24e349bcbac8a03a5a00d0dfa207baf53ca5',
revision = '3f0f6b24d599e92460b969aabc4f4c5a914d15a0',
url = 'https://github.com/alexmozaidze/tree-sitter-fennel',
},
maintainers = { '@alexmozaidze' },
@ -560,7 +567,7 @@ return {
},
fish = {
install_info = {
revision = 'aa074a0bacde8b5823c592574d7138f156a95776',
revision = '5248e7c375183b83f70cc6d8a7b2f5438234d395',
url = 'https://github.com/ram02z/tree-sitter-fish',
},
maintainers = { '@ram02z' },
@ -584,7 +591,7 @@ return {
},
fortran = {
install_info = {
revision = 'e0132896b8959c09dc20b56e4a1c5d25bc341697',
revision = '2880b7aab4fb7cc618de1ef3d4c6d93b2396c031',
url = 'https://github.com/stadelmanma/tree-sitter-fortran',
},
maintainers = { '@amaanq' },
@ -617,7 +624,7 @@ return {
},
gap = {
install_info = {
revision = '2bac14863b76ad0ff6fd7204c50574732acd66df',
revision = 'ed2480d42281586932920527823b307bc45052b8',
url = 'https://github.com/gap-system/tree-sitter-gap',
},
maintainers = { '@reiniscirpons' },
@ -692,7 +699,7 @@ return {
},
gleam = {
install_info = {
revision = '0c0c63a07998767b22f0d2655f903611eca6acd0',
revision = '6ea757f7eb8d391dbf24dbb9461990757946dd5e',
url = 'https://github.com/gleam-lang/tree-sitter-gleam',
},
maintainers = { '@amaanq' },
@ -700,7 +707,7 @@ return {
},
glimmer = {
install_info = {
revision = 'da605af8c5999b43e6839b575eae5e6cafabb06f',
revision = '88af85568bde3b91acb5d4c352ed094d0c1f9d84',
url = 'https://github.com/ember-tooling/tree-sitter-glimmer',
},
maintainers = { '@NullVoxPopuli' },
@ -889,7 +896,7 @@ return {
},
hcl = {
install_info = {
revision = 'fad991865fee927dd1de5e172fb3f08ac674d914',
revision = '64ad62785d442eb4d45df3a1764962dafd5bc98b',
url = 'https://github.com/tree-sitter-grammars/tree-sitter-hcl',
},
maintainers = { '@MichaHoffmann' },
@ -1025,7 +1032,7 @@ return {
},
inko = {
install_info = {
revision = 'v0.4.0',
revision = 'v0.5.1',
url = 'https://github.com/inko-lang/tree-sitter-inko',
},
maintainers = { '@yorickpeterse' },
@ -1042,7 +1049,7 @@ return {
},
janet_simple = {
install_info = {
revision = '7e28cbf1ca061887ea43591a2898001f4245fddf',
revision = 'd183186995204314700be3e9e0a48053ea16b350',
url = 'https://github.com/sogaiu/tree-sitter-janet-simple',
},
maintainers = { '@sogaiu' },
@ -1058,7 +1065,7 @@ return {
},
javadoc = {
install_info = {
revision = '373fbd84f35aff70031426ed6edf3cdf52b93532',
revision = 'd1a2efc871825ff29a1d241cdcac5713c99cfd54',
url = 'https://github.com/rmuir/tree-sitter-javadoc',
},
maintainers = { '@rmuir' },
@ -1076,7 +1083,7 @@ return {
jinja = {
install_info = {
location = 'tree-sitter-jinja',
revision = 'e589222a1ad44361bc376d5abdccd08e1fecfee5',
revision = '7bd0422c6a57aaabfee8603502d7708d0a536f5f',
url = 'https://github.com/cathaysia/tree-sitter-jinja',
},
maintainers = { '@cathaysia' },
@ -1087,7 +1094,7 @@ return {
jinja_inline = {
install_info = {
location = 'tree-sitter-jinja_inline',
revision = 'e589222a1ad44361bc376d5abdccd08e1fecfee5',
revision = '7bd0422c6a57aaabfee8603502d7708d0a536f5f',
url = 'https://github.com/cathaysia/tree-sitter-jinja',
},
maintainers = { '@cathaysia' },
@ -1149,7 +1156,7 @@ return {
},
just = {
install_info = {
revision = 'bb0c898a80644de438e6efe5d88d30bf092935cd',
revision = '60df3d5b3fda2a22fdb3621226cafab50b763663',
url = 'https://github.com/IndianBoy42/tree-sitter-just',
},
maintainers = { '@Hubro' },
@ -1181,7 +1188,7 @@ return {
},
kitty = {
install_info = {
revision = 'f821c16397ffab5b776d8781245215811438a624',
revision = 'fa6ab3fd32d890a0217495c96b35761e6d2dcb5b',
url = 'https://github.com/OXY2DEV/tree-sitter-kitty',
},
maintainers = { '@OXY2DEV' },
@ -1189,7 +1196,7 @@ return {
},
kos = {
install_info = {
revision = '5f11d41b3150b0837e8b3964151ebb7fc4f367e9',
revision = '03b261c1a78b71c38cf4616497f253c4a4ce118b',
url = 'https://github.com/kos-lang/tree-sitter-kos',
},
maintainers = { '@cdragan' },
@ -1197,10 +1204,9 @@ return {
},
kotlin = {
install_info = {
revision = '57fb4560ba8641865bc0baa6b3f413b236112c4c',
revision = 'c10ad83a66c76855e006496db3bdb002afc49203',
url = 'https://github.com/fwcd/tree-sitter-kotlin',
},
maintainers = { '@SalBakraa' },
tier = 2,
},
koto = {
@ -1221,7 +1227,7 @@ return {
},
lalrpop = {
install_info = {
revision = '8d38e9755c05d37df8a24dadb0fc64f6588ac188',
revision = '27b0f7bb55b4cabd8f01a933d9ee6a49dbfc2192',
url = 'https://github.com/traxys/tree-sitter-lalrpop',
},
maintainers = { '@traxys' },
@ -1270,7 +1276,7 @@ return {
},
liquidsoap = {
install_info = {
revision = '4de01f44de2c051c33832ce523cf44690561320d',
revision = 'd092c65598e940564e12214ff7c2097528cfa159',
url = 'https://github.com/savonet/tree-sitter-liquidsoap',
},
maintainers = { '@toots' },
@ -1286,7 +1292,7 @@ return {
},
lua = {
install_info = {
revision = 'e284fcec45ead0d477e326fccd2cd4a68a89dae4',
revision = 'e40f5b6e6df9c2d1d6d664ff5d346a75d71ee6b2',
url = 'https://github.com/tree-sitter-grammars/tree-sitter-lua',
},
maintainers = { '@muniftanjim' },
@ -1328,8 +1334,8 @@ return {
},
make = {
install_info = {
revision = 'a4b9187417d6be349ee5fd4b6e77b4172c6827dd',
url = 'https://github.com/alemuller/tree-sitter-make',
revision = '5e9e8f8ff3387b0edcaa90f46ddf3629f4cfeb1d',
url = 'https://github.com/tree-sitter-grammars/tree-sitter-make',
},
maintainers = { '@lewis6991' },
tier = 2,
@ -1337,7 +1343,7 @@ return {
markdown = {
install_info = {
location = 'tree-sitter-markdown',
revision = '2dfd57f547f06ca5631a80f601e129d73fc8e9f0',
revision = 'cee71b8288f2ec09c29415219ac15a654bd571b9',
url = 'https://github.com/tree-sitter-grammars/tree-sitter-markdown',
},
maintainers = { '@MDeiml' },
@ -1348,7 +1354,7 @@ return {
markdown_inline = {
install_info = {
location = 'tree-sitter-markdown-inline',
revision = '2dfd57f547f06ca5631a80f601e129d73fc8e9f0',
revision = 'cee71b8288f2ec09c29415219ac15a654bd571b9',
url = 'https://github.com/tree-sitter-grammars/tree-sitter-markdown',
},
maintainers = { '@MDeiml' },
@ -1357,7 +1363,7 @@ return {
},
matlab = {
install_info = {
revision = '1bccabdbd420a9c3c3f96f36d7f9e65b3d9c88ef',
revision = '574dde565caddf8cf44eec7df3cb89eb96053ed7',
url = 'https://github.com/acristoffers/tree-sitter-matlab',
},
maintainers = { '@acristoffers' },
@ -1380,7 +1386,7 @@ return {
},
meson = {
install_info = {
revision = 'd4fa3c7260d1537ac5183740b9338373a673d5c0',
revision = 'c84f3540624b81fc44067030afce2ff78d6ede05',
url = 'https://github.com/tree-sitter-grammars/tree-sitter-meson',
},
maintainers = { '@Decodetalkers' },
@ -1389,7 +1395,7 @@ return {
mlir = {
install_info = {
generate = true,
revision = 'c7eec06be8a9ddae688e1b03fca2eed79e9801c4',
revision = 'fe703bcb17ee58a3029df8a35099be1415877633',
url = 'https://github.com/artagnon/tree-sitter-mlir',
},
maintainers = { '@artagnon' },
@ -1428,7 +1434,7 @@ return {
},
nim = {
install_info = {
revision = '4ad352773688deb84a95eeaa9872acda5b466439',
revision = '9b4ede21a6ca866d29263f6b66c070961bc622b4',
url = 'https://github.com/alaviss/tree-sitter-nim',
},
maintainers = { '@aMOPel' },
@ -1469,7 +1475,7 @@ return {
},
nu = {
install_info = {
revision = '4c149627cc592560f77ead1c384e27ec85926407',
revision = 'bb3f533e5792260291945e1f329e1f0a779def6e',
url = 'https://github.com/nushell/tree-sitter-nu',
},
maintainers = { '@abhisheksingh0x558' },
@ -1564,7 +1570,7 @@ return {
php = {
install_info = {
location = 'php',
revision = '7d07b41ce2d442ca9a90ed85d0075eccc17ae315',
revision = '015ce839db5ae9ceda763bf12e071867fbe8cc89',
url = 'https://github.com/tree-sitter/tree-sitter-php',
},
maintainers = { '@tk-shirasaka', '@calebdw' },
@ -1575,7 +1581,7 @@ return {
php_only = {
install_info = {
location = 'php_only',
revision = '7d07b41ce2d442ca9a90ed85d0075eccc17ae315',
revision = '015ce839db5ae9ceda763bf12e071867fbe8cc89',
url = 'https://github.com/tree-sitter/tree-sitter-php',
},
maintainers = { '@tk-shirasaka', '@calebdw' },
@ -1600,7 +1606,7 @@ return {
},
pkl = {
install_info = {
revision = 'ac58931956c000d3aeefbb55a81fc3c5bd6aecf0',
revision = '0be2b56dec91cf03d6b653dcbb24188dd5c44dd6',
url = 'https://github.com/apple/tree-sitter-pkl',
},
maintainers = { '@ribru17' },
@ -1703,10 +1709,10 @@ return {
},
proto = {
install_info = {
revision = 'e9f6b43f6844bd2189b50a422d4e2094313f6aa3',
url = 'https://github.com/treywood/tree-sitter-proto',
revision = '213175b7aa595fab7eba7d4eadeb62d9c7e0879e',
url = 'https://github.com/coder3101/tree-sitter-proto',
},
maintainers = { '@treywood' },
maintainers = { '@stefanvanburen' },
tier = 2,
},
prql = {
@ -1875,7 +1881,7 @@ return {
},
rego = {
install_info = {
revision = '20b5a5958c837bc9f74b231022a68a594a313f6d',
revision = 'ddd39af81fe8b0288102a7cb97959dfce723e0f3',
url = 'https://github.com/FallenAngel97/tree-sitter-rego',
},
maintainers = { '@FallenAngel97' },
@ -1892,7 +1898,7 @@ return {
},
rescript = {
install_info = {
revision = 'd2df8a285fff95de56a91d2f8152aeceb66f40ef',
revision = '43c2f1f35024918d415dc933d4cc534d6419fedf',
url = 'https://github.com/rescript-lang/tree-sitter-rescript',
},
maintainers = { '@ribru17' },
@ -1900,7 +1906,7 @@ return {
},
rifleconf = {
install_info = {
revision = 'fe10eab6cacff239ec61f4456e793bed15703aaf',
revision = '6389ef0fc0d48f0397ec233109c074a0cb685e36',
url = 'https://github.com/purarue/tree-sitter-rifleconf',
},
maintainers = { '@purarue' },
@ -1935,8 +1941,7 @@ return {
revision = '40e52f343f1b1f270d6ecb2ca898ca9b8cba6936',
url = 'https://github.com/faldor20/tree-sitter-roc',
},
maintainers = { '@nat-418' },
tier = 2,
tier = 3,
},
ron = {
install_info = {
@ -1956,7 +1961,7 @@ return {
},
ruby = {
install_info = {
revision = '89bd7a8e5450cb6a942418a619d30469f259e5d6',
revision = 'ab6dca77a8184abc94af6e3e82538741b5078d63',
url = 'https://github.com/tree-sitter/tree-sitter-ruby',
},
maintainers = { '@TravonteD' },
@ -2039,7 +2044,7 @@ return {
},
slint = {
install_info = {
revision = '10fb0f188d7950400773c06ba6c31075866e14bf',
revision = 'a6e4e1c656429e5df52dcfcd92da87b642f6678b',
url = 'https://github.com/slint-ui/tree-sitter-slint',
},
maintainers = { '@hunger' },
@ -2080,7 +2085,7 @@ return {
},
solidity = {
install_info = {
revision = '4e938a46c7030dd001bc99e1ac0f0c750ac98254',
revision = '048fe686cb1fde267243739b8bdbec8fc3a55272',
url = 'https://github.com/JoranHonig/tree-sitter-solidity',
},
maintainers = { '@amaanq' },
@ -2131,7 +2136,7 @@ return {
sql = {
install_info = {
branch = 'gh-pages',
revision = '2d5dcd16f9ee49cb5a6d99eabb00fd4ea298587f',
revision = '71f3c41ff9c99505b2bda30361baaefdc3fed2b2',
url = 'https://github.com/derekstride/tree-sitter-sql',
},
maintainers = { '@derekstride' },
@ -2183,7 +2188,7 @@ return {
url = 'https://github.com/madskjeldgaard/tree-sitter-supercollider',
},
maintainers = { '@madskjeldgaard' },
tier = 2,
tier = 3,
},
superhtml = {
install_info = {
@ -2222,7 +2227,7 @@ return {
swift = {
install_info = {
generate = true,
revision = '82a239e4c164b0567fb99b80b53f99ba661f2168',
revision = 'ae604674719764ce26f18017afa4a98949077075',
url = 'https://github.com/alex-pinkus/tree-sitter-swift',
},
maintainers = { '@alex-pinkus' },
@ -2254,7 +2259,7 @@ return {
},
t32 = {
install_info = {
revision = '5b5e4336731bda5ea2e6b78b6a2d9e7a89032b75',
revision = 'c4c5fa31666c66036ad3ace8179a408b8478395f',
url = 'https://github.com/xasc/tree-sitter-t32',
},
maintainers = { '@xasc' },
@ -2312,7 +2317,7 @@ return {
terraform = {
install_info = {
location = 'dialects/terraform',
revision = 'fad991865fee927dd1de5e172fb3f08ac674d914',
revision = '64ad62785d442eb4d45df3a1764962dafd5bc98b',
url = 'https://github.com/MichaHoffmann/tree-sitter-hcl',
},
maintainers = { '@MichaHoffmann' },
@ -2345,7 +2350,7 @@ return {
},
tlaplus = {
install_info = {
revision = '2d831940c782850f64dabf5b7b17e9e51f7f0ebb',
revision = 'add40814fda369f6efd989977b2c498aaddde984',
url = 'https://github.com/tlaplus-community/tree-sitter-tlaplus',
},
maintainers = { '@ahelwer', '@susliko' },
@ -2463,7 +2468,7 @@ return {
unison = {
install_info = {
generate = true,
revision = '169e7f748a540ec360c0cb086b448faad012caa4',
revision = '16650de9f519e41f8e88b22b4c401d50fa0ac8ca',
url = 'https://github.com/kylegoetz/tree-sitter-unison',
},
maintainers = { '@tapegram' },
@ -2504,15 +2509,14 @@ return {
},
vento = {
install_info = {
revision = '3b32474bc29584ea214e4e84b47102408263fe0e',
revision = 'edd6596d4b0f392b87fc345dc26d84a6c32f7059',
url = 'https://github.com/ventojs/tree-sitter-vento',
},
maintainers = { '@wrapperup', '@oscarotero' },
tier = 2,
tier = 3,
},
vhdl = {
install_info = {
revision = '7ae08deb5d1641aa57111342218ca1e1b3a5d539',
revision = '674ed9fe6c13c79c0e7407daaf4518d053e6f0f4',
url = 'https://github.com/jpt13653903/tree-sitter-vhdl',
},
maintainers = { '@jpt13653903' },
@ -2528,7 +2532,7 @@ return {
},
vim = {
install_info = {
revision = '78866caaacf123f4d9d227fe1ab521cc62167a88',
revision = '1cd0a0892b389bd314a9bd09545160e5ee3c9137',
url = 'https://github.com/tree-sitter-grammars/tree-sitter-vim',
},
maintainers = { '@clason' },
@ -2553,7 +2557,7 @@ return {
vue = {
install_info = {
branch = 'main',
revision = '22bdfa6c9fc0f5ffa44c6e938ec46869ac8a99ff',
revision = 'ce8011a414fdf8091f4e4071752efc376f4afb08',
url = 'https://github.com/tree-sitter-grammars/tree-sitter-vue',
},
maintainers = { '@WhyNotHugo', '@lucario387' },
@ -2611,7 +2615,7 @@ return {
xml = {
install_info = {
location = 'xml',
revision = '863dbc381f44f6c136a399e684383b977bb2beaa',
revision = '5000ae8f22d11fbe93939b05c1e37cf21117162d',
url = 'https://github.com/tree-sitter-grammars/tree-sitter-xml',
},
maintainers = { '@ObserverOfTime' },
@ -2620,7 +2624,7 @@ return {
},
xresources = {
install_info = {
revision = 'f60fb1e661d85f35fb8e7b988a41d2a74f65bfd4',
revision = '30c59f2f095910509a8379f5de71db3acfef15d6',
url = 'https://github.com/ValdezFOmar/tree-sitter-xresources',
},
maintainers = { '@ValdezFOmar' },
@ -2628,7 +2632,7 @@ return {
},
yaml = {
install_info = {
revision = '7708026449bed86239b1cd5bce6e3c34dbca6415',
revision = '4463985dfccc640f3d6991e3396a2047610cf5f8',
url = 'https://github.com/tree-sitter-grammars/tree-sitter-yaml',
},
maintainers = { '@amaanq' },
@ -2684,7 +2688,7 @@ return {
},
zsh = {
install_info = {
revision = 'v0.52.1',
revision = 'v0.53.0',
url = 'https://github.com/georgeharker/tree-sitter-zsh',
},
maintainers = { '@georgeharker' },

View file

@ -28,6 +28,12 @@
(binding_name
(identifier) @keyword)
(class_binding
[
(identifier)
(class_name)
] @keyword)
(event_binding
(binding_name
(identifier) @keyword))

View file

@ -0,0 +1,229 @@
; Comments
[
(line_comment)
(block_comment)
] @comment @spell
; String and numeric literals
(string_literal) @string
(escape_sequence) @string.escape
(integer_literal) @number
(boolean_literal) @boolean
; Variables
(identifier) @variable
(args_keyword) @variable.builtin
(argn_identifier) @variable.builtin
(retval_identifier) @variable.builtin
(scratch_variable) @variable
(map_variable) @variable
(script_parameter) @variable.parameter
; Macro
(macro_definition
(identifier) @function.macro)
; Probes
; fentry/fexit, kprobe/kretprobe, rawtracepoint
(probe
provider: (_) @type.builtin
module: (wildcard_identifier) @module
function: (wildcard_identifier) @property)
(probe
provider: (_) @type.builtin
function: (wildcard_identifier) @property)
; uprobe/uretprobe
(probe
provider: (uprobe_uretprobe_provider) @type.builtin
binary: (file_identifier) @string.special.path
function: (identifier) @property)
; tracepoint
(probe
provider: (_) @type.builtin
subsys: (wildcard_identifier) @module
event: (wildcard_identifier) @property)
; software/hardware
(probe
provider: (_) @type.builtin
event: (identifier_with_dash) @property
count: (integer_literal) @number)
(probe
provider: (_) @type.builtin
event: (identifier_with_dash) @property)
; bench/test
(probe
provider: (bench_test_provider) @type.builtin
function: (identifier) @property)
; profile/interval
(probe
provider: (profile_interval_provider) @type.builtin
unit: (time_unit) @string.special
count: (integer_literal) @property)
(probe
provider: (profile_interval_provider) @type.builtin
count: (integer_literal) @number)
; iter
(probe
provider: (iter_provider) @type.builtin
object: (identifier) @module
pin: (file_identifier) @property)
(probe
provider: (iter_provider) @type.builtin
object: (identifier) @module)
; ustd
(probe
provider: (ustd_provider) @type.builtin
binary: (file_identifier) @string.special.path
namespace: (identifier) @variable
function: (identifier) @property)
(probe
provider: (ustd_provider) @type.builtin
binary: (file_identifier) @string.special.path
function: (identifier) @property)
; watchpoint/asyncwatchpoint
(probe
provider: (watchpoint_provider) @type.builtin
address: (integer_literal) @number
length: (integer_literal) @number
mode: (watchpoint_mode) @property)
; Types
(type_specifier) @type
(integer_type) @type.builtin
[
"BEGIN"
"begin"
"END"
"end"
] @type.builtin
; Keywords
(hashbang) @keyword.directive
(return_statement) @keyword.return
[
"config"
"let"
"macro"
"offsetof"
"sizeof"
] @keyword
[
"if"
"else"
] @keyword.conditional
[
"for"
"unroll"
"while"
(break_statement)
(continue_statement)
] @keyword.repeat
"import" @keyword.import
(field_expression
field: (identifier) @property)
(call_expression
function: (identifier) @function.call)
; Punctuations
[
"("
")"
"["
"]"
"{"
"}"
] @punctuation.bracket
[
","
";"
":"
"."
] @punctuation.delimiter
; Operators
[
; Field access
"->"
; Range
".."
; Assignment
"="
"<<="
">>="
"+="
"-="
"*="
"/="
"%="
"&="
"|="
"^="
; Update
"--"
"++"
; Arithmetic
"%"
"+"
"-"
"*"
"/"
; Relational
"<="
"<"
">="
">"
"=="
"!="
; Bitwise
"&"
"^"
"|"
"~"
"<<"
">>"
; Logical
"&&"
"||"
"!"
] @operator
(conditional_expression
[
"?"
":"
] @keyword.conditional.ternary)
(predicate
"/" @punctuation.delimiter)

View file

@ -0,0 +1,12 @@
([
(c_struct)
(c_preproc)
(c_preproc_block)
] @injection.content
(#set! injection.language "c"))
([
(line_comment)
(block_comment)
] @injection.content
(#set! injection.language "comment"))

View file

@ -106,6 +106,7 @@
"$if"
"$include"
"$is_const"
"$kindof"
"$nameof"
"$offsetof"
"$qnameof"
@ -218,6 +219,8 @@
"&&&"
"+++"
"|||"
"???"
"+++="
] @operator
(range_expr
@ -232,6 +235,7 @@
(ternary_expr
[
"?"
"???"
":"
] @keyword.conditional.ternary)
@ -268,8 +272,8 @@
(#any-of? @variable.builtin
"alignof" "associated" "elements" "extnameof" "from_ordinal" "get" "inf" "is_eq" "is_ordered"
"is_substruct" "len" "lookup" "lookup_field" "max" "membersof" "methodsof" "min" "nan" "inner"
"kindof" "names" "nameof" "params" "paramsof" "parentof" "qnameof" "returns" "sizeof" "tagof"
"has_tagof" "values" "typeid")))
"kindof" "names" "nameof" "params" "paramsof" "parentof" "qnameof" "returns" "sizeof" "set"
"tagof" "has_tagof" "values" "typeid")))
; Label
[
@ -285,7 +289,7 @@
(path_ident
(ident) @module))
(import_declaration
(import_path
(path_ident
(ident) @module))
@ -298,6 +302,9 @@
(call_inline_attributes
(at_ident) @attribute)
(type_suffix
(at_ident) @attribute)
(asm_block_stmt
(at_ident) @attribute)

View file

@ -112,15 +112,16 @@
(command
name: (word) @function.call)
; derived from builtin -n (fish 3.2.2)
; derived from builtin -n (fish 4.3.3)
(command
name: [
(word) @function.builtin
(#any-of? @function.builtin
"." ":" "_" "abbr" "alias" "argparse" "bg" "bind" "block" "breakpoint" "builtin" "cd"
"command" "commandline" "complete" "contains" "count" "disown" "echo" "emit" "eval" "exec"
"exit" "fg" "functions" "history" "isatty" "jobs" "math" "path" "printf" "pwd" "random" "read"
"realpath" "set" "set_color" "source" "status" "string" "test" "time" "type" "ulimit" "wait")
"exit" "fg" "fish_indent" "fish_key_reader" "functions" "history" "isatty" "jobs" "math"
"path" "printf" "pwd" "random" "read" "realpath" "set" "set_color" "source" "status" "string"
"test" "time" "type" "ulimit" "wait")
])
; Functions
@ -163,15 +164,15 @@
; Reference: https://fishshell.com/docs/current/language.html#special-variables
((variable_name) @variable.builtin
(#any-of? @variable.builtin
"PATH" "CDPATH" "LANG" "LC_ALL" "LC_COLLATE" "LC_CTYPE" "LC_MESSAGES" "LC_MONETARY" "LC_NUMERIC"
"LC_TIME" "fish_color_normal" "fish_color_command" "fish_color_keyword" "fish_color_keyword"
"fish_color_redirection" "fish_color_end" "fish_color_error" "fish_color_param"
"fish_color_valid_path" "fish_color_option" "fish_color_comment" "fish_color_selection"
"fish_color_operator" "fish_color_escape" "fish_color_autosuggestion" "fish_color_cwd"
"fish_color_cwd_root" "fish_color_user" "fish_color_host" "fish_color_host_remote"
"fish_color_status" "fish_color_cancel" "fish_color_search_match" "fish_color_history_current"
"fish_pager_color_progress" "fish_pager_color_background" "fish_pager_color_prefix"
"fish_pager_color_completion" "fish_pager_color_description"
"PATH" "CDPATH" "LANG" "LANGUAGE" "LC_ALL" "LC_COLLATE" "LC_CTYPE" "LC_MESSAGES" "LC_MONETARY"
"LC_NUMERIC" "LC_TIME" "fish_color_normal" "fish_color_command" "fish_color_keyword"
"fish_color_keyword" "fish_color_redirection" "fish_color_end" "fish_color_error"
"fish_color_param" "fish_color_valid_path" "fish_color_option" "fish_color_comment"
"fish_color_selection" "fish_color_operator" "fish_color_escape" "fish_color_autosuggestion"
"fish_color_cwd" "fish_color_cwd_root" "fish_color_user" "fish_color_host"
"fish_color_host_remote" "fish_color_status" "fish_color_cancel" "fish_color_search_match"
"fish_color_history_current" "fish_pager_color_progress" "fish_pager_color_background"
"fish_pager_color_prefix" "fish_pager_color_completion" "fish_pager_color_description"
"fish_pager_color_selected_background" "fish_pager_color_selected_prefix"
"fish_pager_color_selected_completion" "fish_pager_color_selected_description"
"fish_pager_color_secondary_background" "fish_pager_color_secondary_prefix"
@ -183,8 +184,8 @@
"fish_cursor_visual" "fish_cursor_external" "fish_function_path" "fish_greeting" "fish_history"
"fish_trace" "FISH_DEBUG" "FISH_DEBUG_OUTPUT" "fish_user_paths" "umask" "BROWSER" "_" "argv"
"CMD_DURATION" "COLUMNS" "LINES" "fish_kill_signal" "fish_killring" "fish_read_limit" "fish_pid"
"history" "HOME" "hostname" "IFS" "last_pid" "PWD" "pipestatus" "SHLVL" "status"
"status_generation" "TERM" "USER" "EUID" "version" "FISH_VERSION"))
"fish_terminal_color_theme" "history" "HOME" "hostname" "IFS" "last_pid" "PWD" "pipestatus"
"SHLVL" "status" "status_generation" "TERM" "USER" "EUID" "version" "FISH_VERSION"))
; Nodes
[

View file

@ -3,19 +3,12 @@
(#set! injection.language "comment"))
; <style> tags
((element_node
(element_node_start
(tag_name) @_tag_name
(#eq? @_tag_name "style"))) @injection.content
(#offset! @injection.content 0 7 0 -8)
(#set! injection.language "css")
(#set! injection.include-children))
((style_element
(raw_text) @injection.content)
(#set! injection.language "css"))
; <script> tags
((element_node
(element_node_start
(tag_name) @_tag_name
(#eq? @_tag_name "script"))) @injection.content
(#offset! @injection.content 0 8 0 -9)
(#set! injection.language "glimmer_javascript")
((script_element
(raw_text) @injection.content)
(#set! injection.language "javascript")
(#set! injection.include-children))

View file

@ -1,3 +1,5 @@
; inherits: typescript
(glimmer_opening_tag) @indent.begin
(glimmer_closing_tag) @indent.end

View file

@ -9,7 +9,8 @@
(_) @variable.parameter))
(expression/lambda
(_)+ @variable.parameter
patterns: (patterns
(_) @variable.parameter)
"->")
(decl/function
@ -226,7 +227,8 @@
(qualified
((module) @module
(variable) @function.call))
])
]
operator: (operator))
; infix operators applied to variables
((expression/variable) @variable
@ -245,7 +247,7 @@
(function
(infix
left_operand: [
(variable) @variable
(variable) @variable.parameter
(qualified
((module) @module
(variable) @variable))

View file

@ -1,9 +1,11 @@
(tag_name) @tag
(tag_name) @tag @nospell
; (erroneous_end_tag_name) @error ; we do not lint syntax errors
(comment) @comment @spell
(attribute_name) @tag.attribute
(attribute_name) @tag.attribute @nospell
(attribute_value) @nospell
((attribute
(quoted_attribute_value) @string)

View file

@ -4,8 +4,13 @@
(number) @number
(float_number) @number.float
(identifier) @variable
(parameter
parameter: (identifier) @variable.parameter)
(property_identifier) @property
[
@ -57,8 +62,9 @@
"=>"
] @keyword.function
"_" @character.special
[
"_"
(line)
"assert"
;"async"
@ -96,6 +102,15 @@
"}"
] @punctuation.bracket
(string_literal_begin
"\\(" @punctuation.special)
(string_literal_continuation
"\\(" @punctuation.special)
(formatted_string
")" @punctuation.special)
[
";"
":"

View file

@ -153,7 +153,7 @@
"charArrayOf" "emptyArray" "mapOf" "setOf" "listOf" "emptyMap" "emptySet" "emptyList"
"mutableMapOf" "mutableSetOf" "mutableListOf" "print" "println" "error" "TODO" "run"
"runCatching" "repeat" "lazy" "lazyOf" "enumValues" "enumValueOf" "assert" "check"
"checkNotNull" "require" "requireNotNull" "with" "suspend" "synchronized"))
"checkNotNull" "require" "requireNotNull" "with" "synchronized"))
; Literals
[
@ -343,12 +343,11 @@
"?:"
"!!"
"is"
"!is"
"in"
"!in"
"as"
"as?"
".."
"..<"
"->"
] @operator

View file

@ -34,10 +34,10 @@
(_)
.
(string
content: _ @_method)
content: (_) @_method)
.
(string
content: _ @injection.content)))
content: (_) @injection.content)))
(#any-of? @_vimcmd_identifier "vim.rpcrequest" "vim.rpcnotify")
(#eq? @_method "nvim_exec_lua")
(#set! injection.language "lua"))

View file

@ -48,7 +48,8 @@
((string_fragment) @injection.content
(#set! injection.language "bash")))
]
(#lua-match? @_path "^%a+Phase$"))
(#lua-match? @_path "^%a+Phase$")
(#set! injection.combined))
(binding
attrpath: (attrpath
@ -61,7 +62,8 @@
((string_fragment) @injection.content
(#set! injection.language "bash")))
]
(#lua-match? @_path "^pre%a+$"))
(#lua-match? @_path "^pre%a+$")
(#set! injection.combined))
(binding
attrpath: (attrpath
@ -74,7 +76,8 @@
((string_fragment) @injection.content
(#set! injection.language "bash")))
]
(#lua-match? @_path "^post%a+$"))
(#lua-match? @_path "^post%a+$")
(#set! injection.combined))
(binding
attrpath: (attrpath
@ -87,7 +90,8 @@
((string_fragment) @injection.content
(#set! injection.language "bash")))
]
(#lua-match? @_path "^script$"))
(#lua-match? @_path "^script$")
(#set! injection.combined))
(apply_expression
function: (_) @_func

View file

@ -476,9 +476,12 @@
[
(line_comment)
(block_comment)
] @comment @spell
[
(outer_doc_comment_marker)
(inner_doc_comment_marker)
] @comment @spell
] @comment.documentation
(line_comment
(doc_comment)) @comment.documentation

View file

@ -5,7 +5,7 @@
(identifier) @_macro_name
]
(token_tree) @injection.content
(#not-any-of? @_macro_name "slint" "html" "json")
(#not-any-of? @_macro_name "slint" "html" "json" "xml")
(#set! injection.language "rust")
(#set! injection.include-children))
@ -16,7 +16,7 @@
(identifier) @injection.language
]
(token_tree) @injection.content
(#any-of? @injection.language "slint" "html" "json")
(#any-of? @injection.language "slint" "html" "json" "xml")
(#offset! @injection.content 0 1 0 -1)
(#set! injection.include-children))

View file

@ -106,7 +106,17 @@
(emph) @markup.italic
(url) @markup.link.url
((url) @markup.link.url
(#set! @markup.link.url url @markup.link.url))
(call
item: (ident) @_link
(#eq? @_link "link")
(group
.
(string) @markup.link.url
(#offset! @markup.link.url 0 1 0 -1)
(#set! @markup.link.url url @markup.link.url)))
; code blocks
(raw_span) @markup.raw

View file

@ -52,12 +52,14 @@
"]"
"{"
"}"
"[]"
] @punctuation.bracket
[
":"
";"
"."
","
] @punctuation.delimiter
"=" @operator

View file

@ -1,6 +1,26 @@
(comment) @comment @spell
(keyword) @keyword
[
"if"
"/if"
"else"
"for"
"/for"
"layout"
"/layout"
"set"
"/set"
"import"
"export"
"/export"
"include"
"function"
"/function"
"fragment"
"/fragment"
"of"
"async"
] @keyword
(tag
[

View file

@ -1,5 +1,5 @@
#!/usr/bin/env -S nvim -l
vim.opt.runtimepath:append('.')
vim.o.rtp = vim.o.rtp .. ',.'
local configs = require('nvim-treesitter.parsers')
local parsers = #_G.arg > 0 and { unpack(_G.arg) }

View file

@ -1,5 +1,5 @@
#!/usr/bin/env -S nvim -l
vim.opt.runtimepath:append('.')
vim.o.rtp = vim.o.rtp .. ',.'
local query_types = require('nvim-treesitter.health').bundled_queries
local configs = require('nvim-treesitter.parsers')

View file

@ -1,4 +1,5 @@
#!/usr/bin/env -S nvim -l
vim.o.rtp = vim.o.rtp .. ',.'
local generate = false
local update = false
@ -16,8 +17,6 @@ for i = 1, #_G.arg do
end
end
vim.opt.runtimepath:append('.')
---@type async.Task
local task = update and require('nvim-treesitter').update('all', { summary = true })
or require('nvim-treesitter').install(

View file

@ -1,5 +1,4 @@
vim.opt.runtimepath:append(os.getenv('PLENARY'))
vim.opt.runtimepath:append('.')
vim.o.rtp = vim.o.rtp .. ',.,' .. os.getenv('PLENARY')
vim.cmd.runtime({ 'plugin/plenary.vim', bang = true })
vim.cmd.runtime({ 'plugin/query_predicates.lua', bang = true })
vim.cmd.runtime({ 'plugin/filetypes.lua', bang = true })
@ -7,8 +6,6 @@ vim.cmd.runtime({ 'plugin/filetypes.lua', bang = true })
vim.filetype.add({
extension = {
conf = 'hocon',
ncl = 'nickel',
tig = 'tiger',
w = 'wing',
},
})

View file

@ -13,7 +13,7 @@ for i = 1, #_G.arg do
end
end
vim.opt.runtimepath:append('.')
vim.o.rtp = vim.o.rtp .. ',.'
local util = require('nvim-treesitter.util')
local parsers = require('nvim-treesitter.parsers')
@ -64,7 +64,7 @@ for k, p in pairs(parsers) do
sha = stdout[line] and vim.split(stdout[line], '\t')[1]
end
if sha and info.revision ~= sha then
if sha and sha ~= '' and info.revision ~= sha then
info.revision = sha
updates[#updates + 1] = name
end

View file

@ -1,5 +1,5 @@
#!/usr/bin/env -S nvim -l
vim.opt.runtimepath:append('.')
vim.o.rtp = vim.o.rtp .. ',.'
local util = require('nvim-treesitter.util')
local parsers = require('nvim-treesitter.parsers')
local tiers = require('nvim-treesitter.config').tiers

View file

@ -21,15 +21,15 @@ fun name(arg1,
# ^ keyword.function
# ^ function
# ^ punctuation.bracket
# ^ variable
# ^ variable.parameter
# ^ punctuation.delimiter
arg2 = "default",
# ^ variable
# ^ variable.parameter
# ^ operator
# ^ string
# ^ punctuation.delimiter
arg3...)
# ^ variable
# ^ variable.parameter
# ^ operator
# ^ punctuation.bracket
{
@ -147,3 +147,37 @@ name.name()
# ^ function.method.call
# ^ punctuation.bracket
# ^ punctuation.bracket
print("hello \(123 + var) world \(true)")
# <- function.call
# ^ punctuation.bracket
# ^ string
# ^ punctuation.special
# ^ number
# ^ operator
# ^ variable
# ^ punctuation.special
# ^ string
# ^ punctuation.special
# ^ boolean
# ^ punctuation.special
# ^ punctuation.bracket
[] -> each((x,_,y) => x + y)
# <- punctuation.bracket
#^ punctuation.bracket
# ^ operator
# ^ function.call
# ^ punctuation.bracket
# ^ punctuation.bracket
# ^ variable.parameter
# ^ punctuation.delimiter
# ^ character.special
# ^ punctuation.delimiter
# ^ variable.parameter
# ^ punctuation.bracket
# ^ keyword.function
# ^ variable
# ^ operator
# ^ variable
# ^ punctuation.bracket

View file

@ -3,8 +3,10 @@ def Xform "cube" (
# <- @keyword
asset[] payloadAssetDependencies = [@fizz.usd@, @buzz.usd@]
# <- @type
# ^ @punctuation.bracket
# ^ @keyword
# ^ @string.special.url
# ^ @punctuation.delimiter
# ^ @string.special.url
}
)

View file

@ -9,7 +9,8 @@ in {
drv1 = stdenv.mkDerivation {
buildPhase = "mkdir $out";
installPhase = ''
echo "bar" > $out/foo.txt
echo "${bar}" > $out/foo.txt
echo "baz"" >> $out/foo.txt
'';
};