mirror of
https://github.com/chenasraf/vim-matchup.git
synced 2026-05-17 17:38:01 +00:00
feat(svelte)!: adapt queries to new parser (#339)
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
] @scope.tag
|
||||
|
||||
(start_tag (tag_name) @open.tag)
|
||||
|
||||
(end_tag
|
||||
(tag_name) @close.tag
|
||||
(#offset! @close.tag 0 -1 0 0))
|
||||
@@ -16,40 +17,70 @@
|
||||
"/>" @close.selftag) @scope.selftag
|
||||
|
||||
; await
|
||||
|
||||
(await_statement
|
||||
(await_start_expr
|
||||
(special_block_keyword) @open.await
|
||||
(await_start
|
||||
"await" @open.await
|
||||
(#offset! @open.await 0 -1 0 0))) @scope.await
|
||||
(await_end_expr
|
||||
(special_block_keyword) @close.await
|
||||
|
||||
(await_end
|
||||
"await" @close.await
|
||||
(#offset! @close.await 0 -1 0 0))
|
||||
(then_expr
|
||||
(special_block_keyword) @mid.await.1
|
||||
|
||||
("then" @mid.await.1
|
||||
(#offset! @mid.await.1 0 -1 0 0))
|
||||
(catch_expr
|
||||
(special_block_keyword) @mid.await.2
|
||||
|
||||
("catch" @mid.await.2
|
||||
(#offset! @mid.await.2 0 -1 0 0))
|
||||
|
||||
; each
|
||||
|
||||
(each_statement
|
||||
(each_start_expr
|
||||
(special_block_keyword) @open.each
|
||||
(each_start
|
||||
"each" @open.each
|
||||
(#offset! @open.each 0 -1 0 0))) @scope.each
|
||||
(each_end_expr
|
||||
(special_block_keyword) @close.each
|
||||
|
||||
(each_end
|
||||
"each" @close.each
|
||||
(#offset! @close.each 0 -1 0 0))
|
||||
|
||||
; if
|
||||
|
||||
(if_statement
|
||||
(if_start_expr
|
||||
(special_block_keyword) @open.if
|
||||
(if_start
|
||||
"if" @open.if
|
||||
(#offset! @open.if 0 -1 0 0))) @scope.if
|
||||
(if_end_expr
|
||||
(special_block_keyword) @close.if
|
||||
|
||||
(if_end
|
||||
"if" @close.if
|
||||
(#offset! @close.if 0 -1 0 0))
|
||||
(else_expr
|
||||
(special_block_keyword) @mid.if.1
|
||||
|
||||
(else_block
|
||||
"else" @mid.if.1
|
||||
(#offset! @mid.if.1 0 -1 0 0))
|
||||
(else_if_expr
|
||||
. (special_block_keyword) @mid.if.2
|
||||
|
||||
(else_if_block
|
||||
"else" @mid.if.2
|
||||
(#offset! @mid.if.2 0 -1 0 0))
|
||||
|
||||
; key
|
||||
|
||||
(key_statement
|
||||
(key_start
|
||||
"key" @open.key
|
||||
(#offset! @open.key 0 -1 0 0))) @scope.key
|
||||
|
||||
(key_end
|
||||
"key" @close.key
|
||||
(#offset! @close.key 0 -1 0 0))
|
||||
|
||||
; snippet
|
||||
|
||||
(snippet_statement
|
||||
(snippet_start
|
||||
"snippet" @open.snippet
|
||||
(#offset! @open.snippet 0 -1 0 0))) @scope.snippet
|
||||
|
||||
(snippet_end
|
||||
"snippet" @close.snippet
|
||||
(#offset! @close.snippet 0 -1 0 0))
|
||||
|
||||
Reference in New Issue
Block a user