aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2025-03-12 09:44:33 +0100
committerChristian Clason <c.clason@uni-graz.at>2025-05-12 18:43:40 +0200
commit12e0246e4fc2b75742d98a546216234444fdad28 (patch)
tree8dcbba7f7093520def0a9c5f964257b34be046eb
parentfeat(install): allow pass callback to `update()` (diff)
downloadnvim-treesitter-12e0246e4fc2b75742d98a546216234444fdad28.tar
nvim-treesitter-12e0246e4fc2b75742d98a546216234444fdad28.tar.gz
nvim-treesitter-12e0246e4fc2b75742d98a546216234444fdad28.tar.bz2
nvim-treesitter-12e0246e4fc2b75742d98a546216234444fdad28.tar.lz
nvim-treesitter-12e0246e4fc2b75742d98a546216234444fdad28.tar.xz
nvim-treesitter-12e0246e4fc2b75742d98a546216234444fdad28.tar.zst
nvim-treesitter-12e0246e4fc2b75742d98a546216234444fdad28.zip
fix(formatter): increase match limit
Problem: Some very long patterns were not formatted correctly. Solution: Increase the match limit when iterating to 1024.
-rw-r--r--SUPPORTED_LANGUAGES.md3
-rw-r--r--lua/nvim-treesitter/parsers.lua98
-rw-r--r--runtime/queries/commonlisp/highlights.scm3
-rw-r--r--runtime/queries/racket/highlights.scm3
-rwxr-xr-xscripts/format-queries.lua2
5 files changed, 55 insertions, 54 deletions
diff --git a/SUPPORTED_LANGUAGES.md b/SUPPORTED_LANGUAGES.md
index 4a1df1671..8eac31b73 100644
--- a/SUPPORTED_LANGUAGES.md
+++ b/SUPPORTED_LANGUAGES.md
@@ -26,10 +26,12 @@ Language | Tier | Queries | Maintainer
[bibtex](https://github.com/latex-lsp/tree-sitter-bibtex) | unstable | `HFIJ ` | @theHamsta, @clason
[bicep](https://github.com/tree-sitter-grammars/tree-sitter-bicep) | unstable | `HFIJL` | @amaanq
[bitbake](https://github.com/tree-sitter-grammars/tree-sitter-bitbake) | unstable | `HFIJL` | @amaanq
+[blade](https://github.com/EmranMR/tree-sitter-blade) | unstable | `HFIJ ` | @calebdw
[blueprint](https://gitlab.com/gabmus/tree-sitter-blueprint) | unstable | `H  J ` | @gabmus
[bp](https://github.com/ambroisie/tree-sitter-bp)[^bp] | unstable | `HFIJL` | @ambroisie
[c](https://github.com/tree-sitter/tree-sitter-c) | unstable | `HFIJL` | @amaanq
[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
[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
@@ -139,6 +141,7 @@ html_tags (queries only)[^html_tags] | unstable | `H IJ ` | @TravonteD
[ispc](https://github.com/tree-sitter-grammars/tree-sitter-ispc) | unstable | `HFIJL` | @fab4100
[janet_simple](https://github.com/sogaiu/tree-sitter-janet-simple) | unstable | `HF JL` | @sogaiu
[java](https://github.com/tree-sitter/tree-sitter-java) | unstable | `HFIJL` | @p00f
+[javadoc](https://github.com/rmuir/tree-sitter-javadoc) | unstable | `H IJ ` | @rmuir
[javascript](https://github.com/tree-sitter/tree-sitter-javascript) | unstable | `HFIJL` | @steelsojka
[jinja](https://github.com/cathaysia/tree-sitter-jinja)[^jinja] | unstable | `H  J ` | @cathaysia
[jinja_inline](https://github.com/cathaysia/tree-sitter-jinja)[^jinja_inline] | unstable | `H  J ` | @cathaysia
diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua
index f4d0ea374..32ef7cdee 100644
--- a/lua/nvim-treesitter/parsers.lua
+++ b/lua/nvim-treesitter/parsers.lua
@@ -19,7 +19,7 @@ return {
angular = {
install_info = {
generate_from_json = true,
- revision = 'cba288924f4832abb619c627539f111004ff22e5',
+ revision = 'be53f2597dded40c90b5f53ed9f4521422f6b6b3',
url = 'https://github.com/dlvandenberg/tree-sitter-angular',
},
maintainers = { '@dlvandenberg' },
@@ -128,8 +128,8 @@ return {
},
blade = {
install_info = {
+ revision = 'bcdc4b01827cac21205f7453e9be02f906943128',
url = 'https://github.com/EmranMR/tree-sitter-blade',
- files = { 'src/parser.c' },
},
maintainers = { '@calebdw' },
tier = 2,
@@ -175,6 +175,14 @@ return {
maintainers = { '@amaanq' },
tier = 2,
},
+ caddy = {
+ install_info = {
+ revision = '2686186edb61be47960431c93a204fb249681360',
+ url = 'https://github.com/opa-oz/tree-sitter-caddy',
+ },
+ maintainers = { '@opa-oz' },
+ tier = 3,
+ },
cairo = {
install_info = {
revision = '6238f609bea233040fe927858156dee5515a0745',
@@ -183,14 +191,6 @@ return {
maintainers = { '@amaanq' },
tier = 2,
},
- caddy = {
- install_info = {
- url = 'https://github.com/opa-oz/tree-sitter-caddy',
- files = { 'src/parser.c', 'src/scanner.c' },
- },
- maintainers = { '@opa-oz' },
- tier = 3,
- },
capnp = {
install_info = {
revision = '7b0883c03e5edd34ef7bcf703194204299d7099f',
@@ -225,7 +225,7 @@ return {
},
cmake = {
install_info = {
- revision = 'c70336e8db6d3842721d9be40610580908ff45ba',
+ revision = 'fe48221d4d9842d916d66b5e71ab3c6307ec28b3',
url = 'https://github.com/uyha/tree-sitter-cmake',
},
maintainers = { '@uyha' },
@@ -242,7 +242,7 @@ return {
commonlisp = {
install_info = {
generate_from_json = true,
- revision = 'bf2a65b1c119898a1a17389e07f2a399c05cdc0c',
+ revision = '32323509b3d9fe96607d151c2da2c9009eb13a2f',
url = 'https://github.com/tree-sitter-grammars/tree-sitter-commonlisp',
},
maintainers = { '@theHamsta' },
@@ -303,7 +303,7 @@ return {
cuda = {
install_info = {
generate_from_json = true,
- revision = '757e0a61f9d38b3d9eaa299e8d866e8283ffc284',
+ revision = '014628ae8d2df391b88ddb9fa0260fd97f770829',
url = 'https://github.com/tree-sitter-grammars/tree-sitter-cuda',
},
maintainers = { '@theHamsta' },
@@ -417,7 +417,7 @@ return {
dtd = {
install_info = {
location = 'dtd',
- revision = '2128a0b249263e238d88cb894dad00c3168fea37',
+ revision = '0d9a8099c963ed53e183425c1b47fa2622c8eaf7',
url = 'https://github.com/tree-sitter-grammars/tree-sitter-xml',
},
maintainers = { '@ObserverOfTime' },
@@ -591,7 +591,7 @@ return {
},
fortran = {
install_info = {
- revision = '21b740801794b6570a0380f8aef22bb67214ea65',
+ revision = '64e11001d7ef3e8ac18e55a3a2d811fe36430923',
url = 'https://github.com/stadelmanma/tree-sitter-fortran',
},
maintainers = { '@amaanq' },
@@ -692,7 +692,7 @@ return {
},
gitcommit = {
install_info = {
- revision = 'db0e0c4fb9095fdc42a7af34019c0616c071e9eb',
+ revision = 'a716678c0f00645fed1e6f1d0eb221481dbd6f6d',
url = 'https://github.com/gbprod/tree-sitter-gitcommit',
},
maintainers = { '@gbprod' },
@@ -708,7 +708,7 @@ return {
},
gleam = {
install_info = {
- revision = 'e01c88449b53e2ee5dad222d4020cc7006c5b700',
+ revision = '99ec4101504452c488b7c835fb65cfef75b090b7',
url = 'https://github.com/gleam-lang/tree-sitter-gleam',
},
maintainers = { '@amaanq' },
@@ -726,7 +726,7 @@ return {
glimmer_javascript = {
install_info = {
generate_from_json = true,
- revision = '7e8ea8cf39fc360cb97bd253442cd48e4f7a9ce3',
+ revision = 'babba3fc0c822a633261ce9e96a4d7986050eb0c',
url = 'https://github.com/NullVoxPopuli/tree-sitter-glimmer-javascript',
},
maintainers = { '@NullVoxPopuli' },
@@ -736,7 +736,7 @@ return {
glimmer_typescript = {
install_info = {
generate_from_json = true,
- revision = '4006128790efb58ca82a4492d8ef0983b260fc6a',
+ revision = '48c60295f1ee34ea4ed6e5177102be6d24bfc9d0',
url = 'https://github.com/NullVoxPopuli/tree-sitter-glimmer-typescript',
},
maintainers = { '@NullVoxPopuli' },
@@ -746,7 +746,7 @@ return {
glsl = {
install_info = {
generate_from_json = true,
- revision = '66aec57f7119c7e8e40665b723cd7af5594f15ee',
+ revision = '24a6c8ef698e4480fecf8340d771fbcb5de8fbb4',
url = 'https://github.com/tree-sitter-grammars/tree-sitter-glsl',
},
maintainers = { '@theHamsta' },
@@ -936,7 +936,7 @@ return {
hlsl = {
install_info = {
generate_from_json = true,
- revision = 'b309425a7ab4456605cfe78774b80f7e275ca87d',
+ revision = 'bab9111922d53d43668fabb61869bec51bbcb915',
url = 'https://github.com/tree-sitter-grammars/tree-sitter-hlsl',
},
maintainers = { '@theHamsta' },
@@ -1082,8 +1082,8 @@ return {
},
javadoc = {
install_info = {
+ revision = 'db9589e9c61cff7d7fcc207744c711b10b60a7a3',
url = 'https://github.com/rmuir/tree-sitter-javadoc',
- files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@rmuir' },
tier = 2,
@@ -1223,7 +1223,7 @@ return {
},
koto = {
install_info = {
- revision = '329b0e84ef6cc6950665de4accd0bdda1601a2f1',
+ revision = '673511402dfef07b25cfa43991693b8442695fc7',
url = 'https://github.com/koto-lang/tree-sitter-koto',
},
maintainers = { '@irh' },
@@ -1239,7 +1239,7 @@ return {
},
lalrpop = {
install_info = {
- revision = 'a7f5ea297bd621d072ed4cb2cc8ba5ae64ae3c4b',
+ revision = '8d38e9755c05d37df8a24dadb0fc64f6588ac188',
url = 'https://github.com/traxys/tree-sitter-lalrpop',
},
maintainers = { '@traxys' },
@@ -1280,7 +1280,7 @@ return {
},
liquid = {
install_info = {
- revision = '6e03a054a71cd419d9702725243137641e97ba51',
+ revision = 'd269f4d52cd08f6cbc6636ee23cc30a9f6c32e42',
url = 'https://github.com/hankthetank27/tree-sitter-liquid',
},
maintainers = { '@hankthetank27' },
@@ -1304,7 +1304,7 @@ return {
},
lua = {
install_info = {
- revision = '68d29aa745b68ae22cbbdb5dcb68c20232521ff6',
+ revision = 'db16e76558122e834ee214c8dc755b4a3edc82a9',
url = 'https://github.com/tree-sitter-grammars/tree-sitter-lua',
},
maintainers = { '@muniftanjim' },
@@ -1356,7 +1356,7 @@ return {
markdown = {
install_info = {
location = 'tree-sitter-markdown',
- revision = '192407ab5a24bfc24f13332979b5e7967518754a',
+ revision = '413285231ce8fa8b11e7074bbe265b48aa7277f9',
url = 'https://github.com/tree-sitter-grammars/tree-sitter-markdown',
},
maintainers = { '@MDeiml' },
@@ -1367,7 +1367,7 @@ return {
markdown_inline = {
install_info = {
location = 'tree-sitter-markdown-inline',
- revision = '192407ab5a24bfc24f13332979b5e7967518754a',
+ revision = '413285231ce8fa8b11e7074bbe265b48aa7277f9',
url = 'https://github.com/tree-sitter-grammars/tree-sitter-markdown',
},
maintainers = { '@MDeiml' },
@@ -1399,7 +1399,7 @@ return {
},
meson = {
install_info = {
- revision = '742a21e11e914096e0172dad2f0b85e7554c95ff',
+ revision = '9c74e8e8917b83d90e38ac040949079437ec0043',
url = 'https://github.com/tree-sitter-grammars/tree-sitter-meson',
},
maintainers = { '@Decodetalkers' },
@@ -1408,7 +1408,7 @@ return {
mlir = {
install_info = {
generate = true,
- revision = 'c7c62f37a8612a897d25906d93363fec36c1591c',
+ revision = '922cbb97f3d20044e6b4362b3d7af5e530ed8f34',
url = 'https://github.com/artagnon/tree-sitter-mlir',
},
maintainers = { '@artagnon' },
@@ -1659,7 +1659,7 @@ return {
powershell = {
filetype = 'ps1',
install_info = {
- revision = 'e904962e25858b7e8e19c653e737ad3b7d1c55bd',
+ revision = '66d5e61126989c0aca57ff77d19b2064919b51e1',
url = 'https://github.com/airbus-cert/tree-sitter-powershell',
},
maintainers = { '@L2jLiga' },
@@ -1684,7 +1684,7 @@ return {
problog = {
install_info = {
location = 'grammars/problog',
- revision = '93c69d2f84d8a167c0a3f4a8d51ccefe365a4dc8',
+ revision = 'd8d415f6a1cf80ca138524bcc395810b176d40fa',
url = 'https://github.com/foxyseta/tree-sitter-prolog',
},
maintainers = { '@foxyseta' },
@@ -1694,7 +1694,7 @@ return {
prolog = {
install_info = {
location = 'grammars/prolog',
- revision = '93c69d2f84d8a167c0a3f4a8d51ccefe365a4dc8',
+ revision = 'd8d415f6a1cf80ca138524bcc395810b176d40fa',
url = 'https://github.com/foxyseta/tree-sitter-prolog',
},
maintainers = { '@foxyseta' },
@@ -1812,7 +1812,7 @@ return {
},
query = {
install_info = {
- revision = '0555ac0da902abff06076e40501102cee3ba68bd',
+ revision = '930202c2a80965a7a9ca018b5b2a08b25dfa7f12',
url = 'https://github.com/tree-sitter-grammars/tree-sitter-query',
},
maintainers = { '@steelsojka' },
@@ -1942,7 +1942,7 @@ return {
},
roc = {
install_info = {
- revision = '32e20cb1133a5a189f986c3b5df47ac730fbee3d',
+ revision = '0b1afe88161cbd81f5ddea1bb4fa786314ed49a7',
url = 'https://github.com/faldor20/tree-sitter-roc',
},
maintainers = { '@nat-418' },
@@ -1990,7 +1990,7 @@ return {
},
scala = {
install_info = {
- revision = 'ed939ed550ebff7d4ad8aafb4d5aad44de69965d',
+ revision = '42a1542248ff611ba2091fe76c6dbf42551ebef8',
url = 'https://github.com/tree-sitter/tree-sitter-scala',
},
maintainers = { '@stevanmilic' },
@@ -2188,7 +2188,7 @@ return {
superhtml = {
install_info = {
location = 'tree-sitter-superhtml',
- revision = '91d92846e8baaafc8854d2b9d0ac436bc16234db',
+ revision = 'fc7c594f52528e4a4a08671137850143d55a5bf2',
url = 'https://github.com/kristoff-it/superhtml',
},
maintainers = { '@rockorager' },
@@ -2223,7 +2223,7 @@ return {
swift = {
install_info = {
generate = true,
- revision = '02db52e14bc303322d22019fff7823d72904dfe5',
+ revision = 'aca5a52aa3cab858944d3c02701ccf5b2d8fd0f9',
url = 'https://github.com/alex-pinkus/tree-sitter-swift',
},
maintainers = { '@alex-pinkus' },
@@ -2263,7 +2263,7 @@ return {
},
tact = {
install_info = {
- revision = '83e264928fa194b7283428527259e88e54205264',
+ revision = 'a19be2d4c1956e12facfc717e28f13a6ad0860e0',
url = 'https://github.com/tact-lang/tree-sitter-tact',
},
maintainers = { '@novusnota' },
@@ -2297,7 +2297,7 @@ return {
},
tera = {
install_info = {
- revision = '588f14ce363904bebd926492bbd1d2c53f8d5f14',
+ revision = '482b475b32e6bae67f9d57abc60545399fd9b0a3',
url = 'https://github.com/uncenter/tree-sitter-tera',
},
maintainers = { '@uncenter' },
@@ -2331,7 +2331,7 @@ return {
},
tiger = {
install_info = {
- revision = 'a7f11d946b44244f71df41d2a78af0665d618dae',
+ revision = '4a77b2d7a004587646bddc4e854779044b6db459',
url = 'https://github.com/ambroisie/tree-sitter-tiger',
},
maintainers = { '@ambroisie' },
@@ -2427,7 +2427,7 @@ return {
},
typoscript = {
install_info = {
- revision = '43b221c0b76e77244efdaa9963e402a17c930fbc',
+ revision = '5d8fde870b0ded1f429ba5bb249a9d9f8589ff5f',
url = 'https://github.com/Teddytrombone/tree-sitter-typoscript',
},
maintainers = { '@Teddytrombone' },
@@ -2485,7 +2485,7 @@ return {
v = {
install_info = {
location = 'tree_sitter_v',
- revision = '532bebd50742ef15949bdd67c36d46697c847628',
+ revision = '26c2c4c2b3fb4f7a07ae78d298b36998b7ffa956',
url = 'https://github.com/vlang/v-analyzer',
},
maintainers = { '@kkharji', '@amaanq' },
@@ -2517,7 +2517,7 @@ return {
},
vhdl = {
install_info = {
- revision = '32d3e3daa745bf9f1665676f323be968444619e1',
+ revision = '35ed277d3e98836796bc764010dc3fb800d14ee4',
url = 'https://github.com/jpt13653903/tree-sitter-vhdl',
},
maintainers = { '@jpt13653903' },
@@ -2533,7 +2533,7 @@ return {
},
vim = {
install_info = {
- revision = 'f3cd62d8bd043ef20507e84bb6b4b53731ccf3a7',
+ revision = '11b688a1f0e97c0c4e3dbabf4a38016335f4d237',
url = 'https://github.com/tree-sitter-grammars/tree-sitter-vim',
},
maintainers = { '@clason' },
@@ -2541,7 +2541,7 @@ return {
},
vimdoc = {
install_info = {
- revision = 'd2e4b5c172a109966c2ce0378f73df6cede39400',
+ revision = '2694c3d27e2ca98a0ccde72f33887394300d524e',
url = 'https://github.com/neovim/tree-sitter-vimdoc',
},
maintainers = { '@clason' },
@@ -2610,7 +2610,7 @@ return {
xml = {
install_info = {
location = 'xml',
- revision = '2128a0b249263e238d88cb894dad00c3168fea37',
+ revision = '0d9a8099c963ed53e183425c1b47fa2622c8eaf7',
url = 'https://github.com/tree-sitter-grammars/tree-sitter-xml',
},
maintainers = { '@ObserverOfTime' },
@@ -2668,7 +2668,7 @@ return {
ziggy = {
install_info = {
location = 'tree-sitter-ziggy',
- revision = '00958faeaeb97d9b7beb76f128a5401441182204',
+ revision = '8a29017169f43dc2c3526817e98142eb9a335087',
url = 'https://github.com/kristoff-it/ziggy',
},
maintainers = { '@rockorager' },
@@ -2677,7 +2677,7 @@ return {
ziggy_schema = {
install_info = {
location = 'tree-sitter-ziggy-schema',
- revision = '00958faeaeb97d9b7beb76f128a5401441182204',
+ revision = '8a29017169f43dc2c3526817e98142eb9a335087',
url = 'https://github.com/kristoff-it/ziggy',
},
maintainers = { '@rockorager' },
diff --git a/runtime/queries/commonlisp/highlights.scm b/runtime/queries/commonlisp/highlights.scm
index 7236c84de..dbd41657f 100644
--- a/runtime/queries/commonlisp/highlights.scm
+++ b/runtime/queries/commonlisp/highlights.scm
@@ -295,8 +295,7 @@
"clear-output" "assoc-if" "string/=" "princ" "directory-namestring" "stream-error-stream"
"array-element-type" "setq" "copy-seq" "time" "restart-case" "prog*" "shared-initialize"
"array-total-size" "simple-bit-vector-p" "define-method-combination" "write-byte" "constantly"
- "caddar" "print-object" "vector" "throw" "reverse" ">=" "upper-case-p" "nbutlast")
- )
+ "caddar" "print-object" "vector" "throw" "reverse" ">=" "upper-case-p" "nbutlast"))
(list_lit
.
diff --git a/runtime/queries/racket/highlights.scm b/runtime/queries/racket/highlights.scm
index 9e3066743..ac6b4de4b 100644
--- a/runtime/queries/racket/highlights.scm
+++ b/runtime/queries/racket/highlights.scm
@@ -140,8 +140,7 @@
"unit/c" "unit/new-import-export" "unit/s" "unless" "unquote" "unquote-splicing" "unsyntax"
"unsyntax-splicing" "values/drop" "when" "with-continuation-mark" "with-contract"
"with-contract-continuation-mark" "with-handlers" "with-handlers*" "with-method" "with-syntax"
- "~?" "~@" "λ")
- )
+ "~?" "~@" "λ"))
; builtin procedures
((symbol) @function.builtin
diff --git a/scripts/format-queries.lua b/scripts/format-queries.lua
index f924b8064..c7362687e 100755
--- a/scripts/format-queries.lua
+++ b/scripts/format-queries.lua
@@ -446,7 +446,7 @@ local function format(bufnr, queries)
}
local root = ts.get_parser(bufnr, 'query'):parse(true)[1]:root()
local query = ts.query.parse('query', queries)
- for id, node, metadata in query:iter_captures(root, bufnr) do
+ for id, node, metadata in query:iter_captures(root, bufnr, nil, nil, { match_limit = 1024 }) do
if query.captures[id]:sub(1, 1) ~= '_' then
map[query.captures[id]][node:id()] = metadata and (metadata[id] and metadata[id] or metadata)
or {}