mirror of
https://github.com/chenasraf/vim-matchup.git
synced 2026-05-18 01:38:57 +00:00
Update lua TS queries for upstream parser change, fix #204
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
(for_in_statement
|
||||
(for_statement
|
||||
"do" @open.loop
|
||||
"end" @close.loop) @scope.loop
|
||||
|
||||
@@ -11,13 +11,10 @@
|
||||
(if_statement
|
||||
"if" @open.if
|
||||
"end" @close.if) @scope.if
|
||||
(else "else" @mid.if.1)
|
||||
(elseif "elseif" @mid.if.2)
|
||||
(else_statement "else" @mid.if.1)
|
||||
(elseif_statement "elseif" @mid.if.2)
|
||||
|
||||
(function
|
||||
"function" @open.function
|
||||
"end" @close.function) @scope.function
|
||||
(local_function
|
||||
(function_declaration
|
||||
"function" @open.function
|
||||
"end" @close.function) @scope.function
|
||||
(function_definition
|
||||
|
||||
4
lua/treesitter-matchup/third-party/query.lua
vendored
4
lua/treesitter-matchup/third-party/query.lua
vendored
@@ -142,9 +142,9 @@ function M.iter_prepared_matches(query, qnode, bufnr, start_row, end_row)
|
||||
for id, node in pairs(match) do
|
||||
local name = query.captures[id] -- name of the capture in the query
|
||||
if name ~= nil then
|
||||
local path = split(name..'.node')
|
||||
local path = split(name .. ".node")
|
||||
insert_to_path(prepared_match, path, node)
|
||||
insert_to_path(prepared_match, split(name..'.metadata'), metadata)
|
||||
insert_to_path(prepared_match, split(name .. '.metadata'), metadata)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user