mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-11 07:50:07 -04:00
feat: improve KDL queries
This commit is contained in:
parent
24d5be6e71
commit
c3a7dd4768
8 changed files with 30 additions and 5 deletions
|
|
@ -1,3 +1,8 @@
|
|||
; Folds
|
||||
|
||||
(node_children) @fold
|
||||
[
|
||||
(node)
|
||||
(node_children)
|
||||
(string)
|
||||
(multi_line_comment)
|
||||
] @fold
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
[
|
||||
(single_line_comment)
|
||||
(multi_line_comment)
|
||||
] @comment
|
||||
] @comment @spell
|
||||
|
||||
(node (node_comment) (#set! "priority" 105)) @comment
|
||||
(node (node_field (node_field_comment) (#set! "priority" 105)) @comment)
|
||||
|
|
|
|||
7
queries/kdl/indents.scm
Normal file
7
queries/kdl/indents.scm
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
(node (node_children) @indent)
|
||||
|
||||
"}" @indent_end
|
||||
|
||||
[ "{" "}" ] @branch
|
||||
|
||||
[ "(" ")" ] @branch
|
||||
4
queries/kdl/injections.scm
Normal file
4
queries/kdl/injections.scm
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
[
|
||||
(single_line_comment)
|
||||
(multi_line_comment)
|
||||
] @comment
|
||||
10
queries/kdl/locals.scm
Normal file
10
queries/kdl/locals.scm
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
(document) @scope
|
||||
(node (node_children) @scope)
|
||||
(node_children (node) @scope)
|
||||
|
||||
(identifier) @reference
|
||||
|
||||
(node_field) @definition.field
|
||||
|
||||
(node (identifier) @definition.type)
|
||||
(type) @definition.type
|
||||
Loading…
Add table
Add a link
Reference in a new issue