mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
feat: improve KDL queries
This commit is contained in:
parent
24d5be6e71
commit
c3a7dd4768
8 changed files with 30 additions and 5 deletions
|
|
@ -249,7 +249,7 @@ We are looking for maintainers to add more parsers and to write query files for
|
|||
- [x] [JSON with comments](https://gitlab.com/WhyNotHugo/tree-sitter-jsonc.git) (maintained by @WhyNotHugo)
|
||||
- [x] [jsonnet](https://github.com/sourcegraph/tree-sitter-jsonnet) (maintained by @nawordar)
|
||||
- [x] [julia](https://github.com/tree-sitter/tree-sitter-julia) (maintained by @theHamsta)
|
||||
- [x] [kdl](https://github.com/amaanq/tree-sitter-kdl) (experimental, maintained by @amaanq)
|
||||
- [x] [kdl](https://github.com/amaanq/tree-sitter-kdl) (maintained by @amaanq)
|
||||
- [x] [kotlin](https://github.com/fwcd/tree-sitter-kotlin) (maintained by @SalBakraa)
|
||||
- [x] [lalrpop](https://github.com/traxys/tree-sitter-lalrpop) (maintained by @traxys)
|
||||
- [x] [latex](https://github.com/latex-lsp/tree-sitter-latex) (maintained by @theHamsta, @clason)
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@
|
|||
"revision": "e2f449e2bcc95f1d07ceb62d67f986005f73a6be"
|
||||
},
|
||||
"kdl": {
|
||||
"revision": "f83f3943568c7e7b4f5e0de1b04d722223bd4d80"
|
||||
"revision": "92fcc2fe21474f9f855617a6f705fe3cdb288bfe"
|
||||
},
|
||||
"kotlin": {
|
||||
"revision": "e4637037a5fe6f25fe66c305669faa0855f35692"
|
||||
|
|
|
|||
|
|
@ -757,7 +757,6 @@ list.kdl = {
|
|||
files = { "src/parser.c", "src/scanner.c" },
|
||||
},
|
||||
maintainers = { "@amaanq" },
|
||||
experimental = true,
|
||||
}
|
||||
|
||||
list.kotlin = {
|
||||
|
|
|
|||
|
|
@ -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