mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat!: drop modules, general refactor and cleanup
This commit is contained in:
parent
310f0925ec
commit
692b051b09
1247 changed files with 6096 additions and 9074 deletions
7
runtime/queries/kdl/folds.scm
Normal file
7
runtime/queries/kdl/folds.scm
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
; Folds
|
||||
[
|
||||
(node)
|
||||
(node_children)
|
||||
(string)
|
||||
(multi_line_comment)
|
||||
] @fold
|
||||
71
runtime/queries/kdl/highlights.scm
Normal file
71
runtime/queries/kdl/highlights.scm
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
; Types
|
||||
; Variables
|
||||
(identifier) @variable
|
||||
|
||||
; Nodes
|
||||
(node
|
||||
(identifier) @tag)
|
||||
|
||||
; Type annotation
|
||||
(type
|
||||
(identifier) @type)
|
||||
|
||||
; Properties
|
||||
(prop
|
||||
(identifier) @property)
|
||||
|
||||
; Operators
|
||||
[
|
||||
"="
|
||||
"+"
|
||||
"-"
|
||||
] @operator
|
||||
|
||||
; Literals
|
||||
(string) @string
|
||||
|
||||
(escape) @string.escape
|
||||
|
||||
(number) @number
|
||||
|
||||
(number
|
||||
(decimal) @number.float)
|
||||
|
||||
(number
|
||||
(exponent) @number.float)
|
||||
|
||||
(boolean) @boolean
|
||||
|
||||
"null" @constant.builtin
|
||||
|
||||
; Punctuation
|
||||
[
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
] @punctuation.bracket
|
||||
|
||||
";" @punctuation.delimiter
|
||||
|
||||
; Comments
|
||||
[
|
||||
(single_line_comment)
|
||||
(multi_line_comment)
|
||||
] @comment @spell
|
||||
|
||||
(node
|
||||
(node_comment)
|
||||
(#set! priority 105)) @comment
|
||||
|
||||
(node
|
||||
(node_field
|
||||
(node_field_comment)
|
||||
(#set! priority 105)) @comment)
|
||||
|
||||
(node_children
|
||||
(node_children_comment)
|
||||
(#set! priority 105)) @comment
|
||||
14
runtime/queries/kdl/indents.scm
Normal file
14
runtime/queries/kdl/indents.scm
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
(node
|
||||
(node_children) @indent.begin)
|
||||
|
||||
"}" @indent.end
|
||||
|
||||
[
|
||||
"{"
|
||||
"}"
|
||||
] @indent.branch
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
] @indent.branch
|
||||
5
runtime/queries/kdl/injections.scm
Normal file
5
runtime/queries/kdl/injections.scm
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
([
|
||||
(single_line_comment)
|
||||
(multi_line_comment)
|
||||
] @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
16
runtime/queries/kdl/locals.scm
Normal file
16
runtime/queries/kdl/locals.scm
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
(document) @local.scope
|
||||
|
||||
(node
|
||||
(node_children) @local.scope)
|
||||
|
||||
(node_children
|
||||
(node) @local.scope)
|
||||
|
||||
(identifier) @local.reference
|
||||
|
||||
(node_field) @local.definition.field
|
||||
|
||||
(node
|
||||
(identifier) @local.definition.type)
|
||||
|
||||
(type) @local.definition.type
|
||||
Loading…
Add table
Add a link
Reference in a new issue