mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-15 18:00:07 -04:00
chore: query formatting
This commit is contained in:
parent
79975d6557
commit
57a8acf0c4
674 changed files with 18466 additions and 12648 deletions
|
|
@ -1,52 +1,62 @@
|
|||
; Structs
|
||||
;------------
|
||||
|
||||
(enum_variant) @constant
|
||||
(struct_entry (identifier) @property)
|
||||
(struct_entry (enum_variant (identifier) @constant))
|
||||
(struct_name (identifier)) @type
|
||||
|
||||
(struct_entry
|
||||
(identifier) @property)
|
||||
|
||||
(struct_entry
|
||||
(enum_variant
|
||||
(identifier) @constant))
|
||||
|
||||
(struct_name
|
||||
(identifier)) @type
|
||||
|
||||
(unit_struct) @type.builtin
|
||||
|
||||
|
||||
; Literals
|
||||
;------------
|
||||
|
||||
(string) @string
|
||||
(boolean) @boolean
|
||||
(integer) @number
|
||||
(float) @number.float
|
||||
(char) @character
|
||||
|
||||
(boolean) @boolean
|
||||
|
||||
(integer) @number
|
||||
|
||||
(float) @number.float
|
||||
|
||||
(char) @character
|
||||
|
||||
; Comments
|
||||
;------------
|
||||
|
||||
[
|
||||
(line_comment)
|
||||
(block_comment)
|
||||
] @comment @spell
|
||||
|
||||
|
||||
; Punctuation
|
||||
;------------
|
||||
[
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
||||
|
||||
["{" "}"] @punctuation.bracket
|
||||
[
|
||||
"("
|
||||
")"
|
||||
] @punctuation.bracket
|
||||
|
||||
["(" ")"] @punctuation.bracket
|
||||
|
||||
["[" "]"] @punctuation.bracket
|
||||
[
|
||||
"["
|
||||
"]"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
","
|
||||
":"
|
||||
] @punctuation.delimiter
|
||||
|
||||
[
|
||||
"-"
|
||||
] @operator
|
||||
"-" @operator
|
||||
|
||||
; Special
|
||||
;------------
|
||||
|
||||
(escape_sequence) @string.escape
|
||||
|
|
|
|||
|
|
@ -5,8 +5,17 @@
|
|||
(struct)
|
||||
] @indent.begin
|
||||
|
||||
[ "{" "}" ] @indent.branch
|
||||
[
|
||||
"{"
|
||||
"}"
|
||||
] @indent.branch
|
||||
|
||||
[ "(" ")" ] @indent.branch
|
||||
[
|
||||
"("
|
||||
")"
|
||||
] @indent.branch
|
||||
|
||||
[ "[" "]" ] @indent.branch
|
||||
[
|
||||
"["
|
||||
"]"
|
||||
] @indent.branch
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@
|
|||
(line_comment)
|
||||
(block_comment)
|
||||
] @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
(#set! injection.language "comment"))
|
||||
|
|
|
|||
|
|
@ -1,12 +1,25 @@
|
|||
(source_file) @local.scope
|
||||
(source_file (array) @local.scope)
|
||||
(source_file (map) @local.scope)
|
||||
(source_file (struct) @local.scope)
|
||||
(source_file (tuple) @local.scope)
|
||||
|
||||
(source_file
|
||||
(array) @local.scope)
|
||||
|
||||
(source_file
|
||||
(map) @local.scope)
|
||||
|
||||
(source_file
|
||||
(struct) @local.scope)
|
||||
|
||||
(source_file
|
||||
(tuple) @local.scope)
|
||||
|
||||
(identifier) @local.reference
|
||||
|
||||
(struct_entry (identifier) @local.definition.field)
|
||||
(struct_entry (identifier) @local.definition.enum (enum_variant))
|
||||
(struct_entry
|
||||
(identifier) @local.definition.field)
|
||||
|
||||
(struct (struct_name) @local.definition.type)
|
||||
(struct_entry
|
||||
(identifier) @local.definition.enum
|
||||
(enum_variant))
|
||||
|
||||
(struct
|
||||
(struct_name) @local.definition.type)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue