mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 10:50:06 -04:00
Merge branch 'nvim-treesitter:main' into main
This commit is contained in:
commit
1a526e8fb5
8 changed files with 41 additions and 33 deletions
|
|
@ -7,7 +7,7 @@ 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, 25, 0 }
|
local TREE_SITTER_MIN_VER = { 0, 26, 1 }
|
||||||
|
|
||||||
---@param name string
|
---@param name string
|
||||||
---@return table?
|
---@return table?
|
||||||
|
|
|
||||||
|
|
@ -197,17 +197,13 @@ end
|
||||||
---@param output_dir string
|
---@param output_dir string
|
||||||
---@return string? err
|
---@return string? err
|
||||||
local function do_download(logger, url, project_name, cache_dir, revision, output_dir)
|
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'
|
local tmp = output_dir .. '-tmp'
|
||||||
|
|
||||||
rmpath(tmp)
|
rmpath(tmp)
|
||||||
a.schedule()
|
a.schedule()
|
||||||
|
|
||||||
url = url:gsub('.git$', '')
|
url = url:gsub('.git$', '')
|
||||||
local target = is_gitlab
|
local target = string.format('%s/archive/%s.tar.gz', url, revision)
|
||||||
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 tarball_path = fs.joinpath(cache_dir, project_name .. '.tar.gz')
|
local tarball_path = fs.joinpath(cache_dir, project_name .. '.tar.gz')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ return {
|
||||||
},
|
},
|
||||||
beancount = {
|
beancount = {
|
||||||
install_info = {
|
install_info = {
|
||||||
revision = '23b21252da8b8cb0f03d1d1fc4c8f87d407e1cdf',
|
revision = 'd7a03a7506fbbbc4b16a9a2054ff7c2b337744b8',
|
||||||
url = 'https://github.com/polarmutex/tree-sitter-beancount',
|
url = 'https://github.com/polarmutex/tree-sitter-beancount',
|
||||||
},
|
},
|
||||||
maintainers = { '@polarmutex' },
|
maintainers = { '@polarmutex' },
|
||||||
|
|
@ -166,7 +166,7 @@ return {
|
||||||
},
|
},
|
||||||
c3 = {
|
c3 = {
|
||||||
install_info = {
|
install_info = {
|
||||||
revision = '2c04e7858d63497152d42f08d3067972618aeedc',
|
revision = '302fab443c2237e3b8fb3e991454db0e442af130',
|
||||||
url = 'https://github.com/c3lang/tree-sitter-c3',
|
url = 'https://github.com/c3lang/tree-sitter-c3',
|
||||||
},
|
},
|
||||||
maintainers = { '@cbuttner' },
|
maintainers = { '@cbuttner' },
|
||||||
|
|
@ -337,7 +337,7 @@ return {
|
||||||
},
|
},
|
||||||
dart = {
|
dart = {
|
||||||
install_info = {
|
install_info = {
|
||||||
revision = 'd4d8f3e337d8be23be27ffc35a0aef972343cd54',
|
revision = '5650b09d9fc4ef9315b361c74aa811bbdbc09458',
|
||||||
url = 'https://github.com/UserNobody14/tree-sitter-dart',
|
url = 'https://github.com/UserNobody14/tree-sitter-dart',
|
||||||
},
|
},
|
||||||
maintainers = { '@akinsho' },
|
maintainers = { '@akinsho' },
|
||||||
|
|
@ -345,7 +345,7 @@ return {
|
||||||
},
|
},
|
||||||
desktop = {
|
desktop = {
|
||||||
install_info = {
|
install_info = {
|
||||||
revision = '137292ae28e05011dbc7c5c383e2b25db1cf77c9',
|
revision = '27c713cd097f85d3024569adf34e069cade84905',
|
||||||
url = 'https://github.com/ValdezFOmar/tree-sitter-desktop',
|
url = 'https://github.com/ValdezFOmar/tree-sitter-desktop',
|
||||||
},
|
},
|
||||||
maintainers = { '@ValdezFOmar' },
|
maintainers = { '@ValdezFOmar' },
|
||||||
|
|
@ -448,7 +448,7 @@ return {
|
||||||
},
|
},
|
||||||
editorconfig = {
|
editorconfig = {
|
||||||
install_info = {
|
install_info = {
|
||||||
revision = '851f2c2483239ce62f919bf3408ccd20dc0b5c01',
|
revision = 'b58de0ce2c52990c8913e39a8c14ce4a40e29a39',
|
||||||
url = 'https://github.com/ValdezFOmar/tree-sitter-editorconfig',
|
url = 'https://github.com/ValdezFOmar/tree-sitter-editorconfig',
|
||||||
},
|
},
|
||||||
maintainers = { '@ValdezFOmar' },
|
maintainers = { '@ValdezFOmar' },
|
||||||
|
|
@ -624,7 +624,7 @@ return {
|
||||||
},
|
},
|
||||||
gap = {
|
gap = {
|
||||||
install_info = {
|
install_info = {
|
||||||
revision = '2bac14863b76ad0ff6fd7204c50574732acd66df',
|
revision = 'ed2480d42281586932920527823b307bc45052b8',
|
||||||
url = 'https://github.com/gap-system/tree-sitter-gap',
|
url = 'https://github.com/gap-system/tree-sitter-gap',
|
||||||
},
|
},
|
||||||
maintainers = { '@reiniscirpons' },
|
maintainers = { '@reiniscirpons' },
|
||||||
|
|
@ -1083,7 +1083,7 @@ return {
|
||||||
jinja = {
|
jinja = {
|
||||||
install_info = {
|
install_info = {
|
||||||
location = 'tree-sitter-jinja',
|
location = 'tree-sitter-jinja',
|
||||||
revision = 'e589222a1ad44361bc376d5abdccd08e1fecfee5',
|
revision = '7bd0422c6a57aaabfee8603502d7708d0a536f5f',
|
||||||
url = 'https://github.com/cathaysia/tree-sitter-jinja',
|
url = 'https://github.com/cathaysia/tree-sitter-jinja',
|
||||||
},
|
},
|
||||||
maintainers = { '@cathaysia' },
|
maintainers = { '@cathaysia' },
|
||||||
|
|
@ -1094,7 +1094,7 @@ return {
|
||||||
jinja_inline = {
|
jinja_inline = {
|
||||||
install_info = {
|
install_info = {
|
||||||
location = 'tree-sitter-jinja_inline',
|
location = 'tree-sitter-jinja_inline',
|
||||||
revision = 'e589222a1ad44361bc376d5abdccd08e1fecfee5',
|
revision = '7bd0422c6a57aaabfee8603502d7708d0a536f5f',
|
||||||
url = 'https://github.com/cathaysia/tree-sitter-jinja',
|
url = 'https://github.com/cathaysia/tree-sitter-jinja',
|
||||||
},
|
},
|
||||||
maintainers = { '@cathaysia' },
|
maintainers = { '@cathaysia' },
|
||||||
|
|
@ -1364,7 +1364,7 @@ return {
|
||||||
},
|
},
|
||||||
matlab = {
|
matlab = {
|
||||||
install_info = {
|
install_info = {
|
||||||
revision = 'f3eef66526fdae0469207d8e561fb5771eea1721',
|
revision = 'f29f784107722e237e188bec333d4779082a2db1',
|
||||||
url = 'https://github.com/acristoffers/tree-sitter-matlab',
|
url = 'https://github.com/acristoffers/tree-sitter-matlab',
|
||||||
},
|
},
|
||||||
maintainers = { '@acristoffers' },
|
maintainers = { '@acristoffers' },
|
||||||
|
|
@ -1405,7 +1405,7 @@ return {
|
||||||
mlir = {
|
mlir = {
|
||||||
install_info = {
|
install_info = {
|
||||||
generate = true,
|
generate = true,
|
||||||
revision = '4ab28ecdacef343af56c09b7981580503e49fadb',
|
revision = 'd989734f56e86c4949a4e74b39d573db8528efa0',
|
||||||
url = 'https://github.com/artagnon/tree-sitter-mlir',
|
url = 'https://github.com/artagnon/tree-sitter-mlir',
|
||||||
},
|
},
|
||||||
maintainers = { '@artagnon' },
|
maintainers = { '@artagnon' },
|
||||||
|
|
@ -1485,7 +1485,7 @@ return {
|
||||||
},
|
},
|
||||||
nu = {
|
nu = {
|
||||||
install_info = {
|
install_info = {
|
||||||
revision = '4c149627cc592560f77ead1c384e27ec85926407',
|
revision = 'bb3f533e5792260291945e1f329e1f0a779def6e',
|
||||||
url = 'https://github.com/nushell/tree-sitter-nu',
|
url = 'https://github.com/nushell/tree-sitter-nu',
|
||||||
},
|
},
|
||||||
maintainers = { '@abhisheksingh0x558' },
|
maintainers = { '@abhisheksingh0x558' },
|
||||||
|
|
@ -1616,7 +1616,7 @@ return {
|
||||||
},
|
},
|
||||||
pkl = {
|
pkl = {
|
||||||
install_info = {
|
install_info = {
|
||||||
revision = 'd9c591b4e770934fe15c2f1b3658f35553f6cb40',
|
revision = '57ed643ffd6b4f12c6f829cd3268e9ad216e2c30',
|
||||||
url = 'https://github.com/apple/tree-sitter-pkl',
|
url = 'https://github.com/apple/tree-sitter-pkl',
|
||||||
},
|
},
|
||||||
maintainers = { '@ribru17' },
|
maintainers = { '@ribru17' },
|
||||||
|
|
@ -2237,7 +2237,7 @@ return {
|
||||||
swift = {
|
swift = {
|
||||||
install_info = {
|
install_info = {
|
||||||
generate = true,
|
generate = true,
|
||||||
revision = 'c7287392d610ca9d7c80f9edd2c6ef8f518b377b',
|
revision = '12bacf3ee30f6c39e7cfa6ca6625cac012589236',
|
||||||
url = 'https://github.com/alex-pinkus/tree-sitter-swift',
|
url = 'https://github.com/alex-pinkus/tree-sitter-swift',
|
||||||
},
|
},
|
||||||
maintainers = { '@alex-pinkus' },
|
maintainers = { '@alex-pinkus' },
|
||||||
|
|
@ -2478,7 +2478,7 @@ return {
|
||||||
unison = {
|
unison = {
|
||||||
install_info = {
|
install_info = {
|
||||||
generate = true,
|
generate = true,
|
||||||
revision = '169e7f748a540ec360c0cb086b448faad012caa4',
|
revision = 'c09e95252b4b3f5914c33d72a48af25089737afd',
|
||||||
url = 'https://github.com/kylegoetz/tree-sitter-unison',
|
url = 'https://github.com/kylegoetz/tree-sitter-unison',
|
||||||
},
|
},
|
||||||
maintainers = { '@tapegram' },
|
maintainers = { '@tapegram' },
|
||||||
|
|
@ -2635,7 +2635,7 @@ return {
|
||||||
},
|
},
|
||||||
xresources = {
|
xresources = {
|
||||||
install_info = {
|
install_info = {
|
||||||
revision = 'a81f1ea4478d03c223ef7eace535a36220bddd8c',
|
revision = '8ec70e2171025d09146afd2cce9712affe9ff3dd',
|
||||||
url = 'https://github.com/ValdezFOmar/tree-sitter-xresources',
|
url = 'https://github.com/ValdezFOmar/tree-sitter-xresources',
|
||||||
},
|
},
|
||||||
maintainers = { '@ValdezFOmar' },
|
maintainers = { '@ValdezFOmar' },
|
||||||
|
|
@ -2643,7 +2643,7 @@ return {
|
||||||
},
|
},
|
||||||
yaml = {
|
yaml = {
|
||||||
install_info = {
|
install_info = {
|
||||||
revision = '7708026449bed86239b1cd5bce6e3c34dbca6415',
|
revision = '4463985dfccc640f3d6991e3396a2047610cf5f8',
|
||||||
url = 'https://github.com/tree-sitter-grammars/tree-sitter-yaml',
|
url = 'https://github.com/tree-sitter-grammars/tree-sitter-yaml',
|
||||||
},
|
},
|
||||||
maintainers = { '@amaanq' },
|
maintainers = { '@amaanq' },
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,7 @@
|
||||||
"$if"
|
"$if"
|
||||||
"$include"
|
"$include"
|
||||||
"$is_const"
|
"$is_const"
|
||||||
|
"$kindof"
|
||||||
"$nameof"
|
"$nameof"
|
||||||
"$offsetof"
|
"$offsetof"
|
||||||
"$qnameof"
|
"$qnameof"
|
||||||
|
|
@ -218,6 +219,8 @@
|
||||||
"&&&"
|
"&&&"
|
||||||
"+++"
|
"+++"
|
||||||
"|||"
|
"|||"
|
||||||
|
"???"
|
||||||
|
"+++="
|
||||||
] @operator
|
] @operator
|
||||||
|
|
||||||
(range_expr
|
(range_expr
|
||||||
|
|
@ -232,6 +235,7 @@
|
||||||
(ternary_expr
|
(ternary_expr
|
||||||
[
|
[
|
||||||
"?"
|
"?"
|
||||||
|
"???"
|
||||||
":"
|
":"
|
||||||
] @keyword.conditional.ternary)
|
] @keyword.conditional.ternary)
|
||||||
|
|
||||||
|
|
@ -268,8 +272,8 @@
|
||||||
(#any-of? @variable.builtin
|
(#any-of? @variable.builtin
|
||||||
"alignof" "associated" "elements" "extnameof" "from_ordinal" "get" "inf" "is_eq" "is_ordered"
|
"alignof" "associated" "elements" "extnameof" "from_ordinal" "get" "inf" "is_eq" "is_ordered"
|
||||||
"is_substruct" "len" "lookup" "lookup_field" "max" "membersof" "methodsof" "min" "nan" "inner"
|
"is_substruct" "len" "lookup" "lookup_field" "max" "membersof" "methodsof" "min" "nan" "inner"
|
||||||
"kindof" "names" "nameof" "params" "paramsof" "parentof" "qnameof" "returns" "sizeof" "tagof"
|
"kindof" "names" "nameof" "params" "paramsof" "parentof" "qnameof" "returns" "sizeof" "set"
|
||||||
"has_tagof" "values" "typeid")))
|
"tagof" "has_tagof" "values" "typeid")))
|
||||||
|
|
||||||
; Label
|
; Label
|
||||||
[
|
[
|
||||||
|
|
@ -285,7 +289,7 @@
|
||||||
(path_ident
|
(path_ident
|
||||||
(ident) @module))
|
(ident) @module))
|
||||||
|
|
||||||
(import_declaration
|
(import_path
|
||||||
(path_ident
|
(path_ident
|
||||||
(ident) @module))
|
(ident) @module))
|
||||||
|
|
||||||
|
|
@ -298,6 +302,9 @@
|
||||||
(call_inline_attributes
|
(call_inline_attributes
|
||||||
(at_ident) @attribute)
|
(at_ident) @attribute)
|
||||||
|
|
||||||
|
(type_suffix
|
||||||
|
(at_ident) @attribute)
|
||||||
|
|
||||||
(asm_block_stmt
|
(asm_block_stmt
|
||||||
(at_ident) @attribute)
|
(at_ident) @attribute)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,10 +34,10 @@
|
||||||
(_)
|
(_)
|
||||||
.
|
.
|
||||||
(string
|
(string
|
||||||
content: _ @_method)
|
content: (_) @_method)
|
||||||
.
|
.
|
||||||
(string
|
(string
|
||||||
content: _ @injection.content)))
|
content: (_) @injection.content)))
|
||||||
(#any-of? @_vimcmd_identifier "vim.rpcrequest" "vim.rpcnotify")
|
(#any-of? @_vimcmd_identifier "vim.rpcrequest" "vim.rpcnotify")
|
||||||
(#eq? @_method "nvim_exec_lua")
|
(#eq? @_method "nvim_exec_lua")
|
||||||
(#set! injection.language "lua"))
|
(#set! injection.language "lua"))
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,8 @@
|
||||||
((string_fragment) @injection.content
|
((string_fragment) @injection.content
|
||||||
(#set! injection.language "bash")))
|
(#set! injection.language "bash")))
|
||||||
]
|
]
|
||||||
(#lua-match? @_path "^%a+Phase$"))
|
(#lua-match? @_path "^%a+Phase$")
|
||||||
|
(#set! injection.combined))
|
||||||
|
|
||||||
(binding
|
(binding
|
||||||
attrpath: (attrpath
|
attrpath: (attrpath
|
||||||
|
|
@ -61,7 +62,8 @@
|
||||||
((string_fragment) @injection.content
|
((string_fragment) @injection.content
|
||||||
(#set! injection.language "bash")))
|
(#set! injection.language "bash")))
|
||||||
]
|
]
|
||||||
(#lua-match? @_path "^pre%a+$"))
|
(#lua-match? @_path "^pre%a+$")
|
||||||
|
(#set! injection.combined))
|
||||||
|
|
||||||
(binding
|
(binding
|
||||||
attrpath: (attrpath
|
attrpath: (attrpath
|
||||||
|
|
@ -74,7 +76,8 @@
|
||||||
((string_fragment) @injection.content
|
((string_fragment) @injection.content
|
||||||
(#set! injection.language "bash")))
|
(#set! injection.language "bash")))
|
||||||
]
|
]
|
||||||
(#lua-match? @_path "^post%a+$"))
|
(#lua-match? @_path "^post%a+$")
|
||||||
|
(#set! injection.combined))
|
||||||
|
|
||||||
(binding
|
(binding
|
||||||
attrpath: (attrpath
|
attrpath: (attrpath
|
||||||
|
|
@ -87,7 +90,8 @@
|
||||||
((string_fragment) @injection.content
|
((string_fragment) @injection.content
|
||||||
(#set! injection.language "bash")))
|
(#set! injection.language "bash")))
|
||||||
]
|
]
|
||||||
(#lua-match? @_path "^script$"))
|
(#lua-match? @_path "^script$")
|
||||||
|
(#set! injection.combined))
|
||||||
|
|
||||||
(apply_expression
|
(apply_expression
|
||||||
function: (_) @_func
|
function: (_) @_func
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ for k, p in pairs(parsers) do
|
||||||
sha = stdout[line] and vim.split(stdout[line], '\t')[1]
|
sha = stdout[line] and vim.split(stdout[line], '\t')[1]
|
||||||
end
|
end
|
||||||
|
|
||||||
if sha and info.revision ~= sha then
|
if sha and sha ~= '' and info.revision ~= sha then
|
||||||
info.revision = sha
|
info.revision = sha
|
||||||
updates[#updates + 1] = name
|
updates[#updates + 1] = name
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,8 @@ in {
|
||||||
drv1 = stdenv.mkDerivation {
|
drv1 = stdenv.mkDerivation {
|
||||||
buildPhase = "mkdir $out";
|
buildPhase = "mkdir $out";
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
echo "bar" > $out/foo.txt
|
echo "${bar}" > $out/foo.txt
|
||||||
|
echo "baz"" >> $out/foo.txt
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue