mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 03:40:04 -04:00
chore: query formatting
This commit is contained in:
parent
79975d6557
commit
57a8acf0c4
674 changed files with 18466 additions and 12648 deletions
|
|
@ -2,6 +2,5 @@
|
|||
(macro)
|
||||
(memory_execution)
|
||||
(subroutine)
|
||||
|
||||
(comment)
|
||||
] @fold
|
||||
|
|
|
|||
|
|
@ -1,15 +1,12 @@
|
|||
; Includes
|
||||
|
||||
(include
|
||||
"~" @keyword.import
|
||||
_ @string.special.url)
|
||||
|
||||
; Variables
|
||||
|
||||
(identifier) @variable
|
||||
|
||||
; Macros
|
||||
|
||||
(macro
|
||||
"%"
|
||||
(identifier) @function.macro)
|
||||
|
|
@ -18,22 +15,28 @@
|
|||
(#lua-match? @function.macro "^[a-z]?[0-9]*[A-Z-_]+$"))
|
||||
|
||||
(rune
|
||||
. rune_start: (rune_char ",")
|
||||
. (identifier) @function.call)
|
||||
.
|
||||
rune_start:
|
||||
(rune_char
|
||||
",")
|
||||
.
|
||||
(identifier) @function.call)
|
||||
|
||||
(rune
|
||||
. rune_start: (rune_char ";")
|
||||
. (identifier) @function.call)
|
||||
.
|
||||
rune_start:
|
||||
(rune_char
|
||||
";")
|
||||
.
|
||||
(identifier) @function.call)
|
||||
|
||||
((identifier) @function.call
|
||||
(#lua-match? @function.call "^:"))
|
||||
|
||||
; Keywords
|
||||
|
||||
(opcode) @keyword
|
||||
|
||||
; Labels
|
||||
|
||||
(label
|
||||
"@" @string.special.symbol
|
||||
(identifier) @function)
|
||||
|
|
@ -44,12 +47,10 @@
|
|||
(identifier) @label)
|
||||
|
||||
; Repeats
|
||||
|
||||
((identifier) @keyword.repeat
|
||||
(#eq? @keyword.repeat "while"))
|
||||
|
||||
; Literals
|
||||
|
||||
(raw_ascii) @string
|
||||
|
||||
(hex_literal
|
||||
|
|
@ -59,10 +60,15 @@
|
|||
(number) @number
|
||||
|
||||
; Punctuation
|
||||
[
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
||||
|
||||
[ "{" "}" ] @punctuation.bracket
|
||||
|
||||
[ "[" "]" ] @punctuation.bracket
|
||||
[
|
||||
"["
|
||||
"]"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
"%"
|
||||
|
|
@ -80,5 +86,4 @@
|
|||
] @punctuation.special
|
||||
|
||||
; Comments
|
||||
|
||||
(comment) @comment @spell
|
||||
|
|
|
|||
|
|
@ -7,9 +7,15 @@
|
|||
|
||||
"}" @indent.end
|
||||
|
||||
[ "{" "}" ] @indent.branch
|
||||
[
|
||||
"{"
|
||||
"}"
|
||||
] @indent.branch
|
||||
|
||||
[ "[" "]" ] @indent.branch
|
||||
[
|
||||
"["
|
||||
"]"
|
||||
] @indent.branch
|
||||
|
||||
[
|
||||
(ERROR)
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
; Scopes
|
||||
|
||||
[
|
||||
(program)
|
||||
(macro)
|
||||
|
|
@ -8,15 +7,15 @@
|
|||
] @local.scope
|
||||
|
||||
; References
|
||||
|
||||
(identifier) @local.reference
|
||||
|
||||
; Definitions
|
||||
|
||||
(label
|
||||
"@"
|
||||
. (identifier) @local.definition.function)
|
||||
.
|
||||
(identifier) @local.definition.function)
|
||||
|
||||
(macro
|
||||
"%"
|
||||
. (identifier) @local.definition.macro)
|
||||
.
|
||||
(identifier) @local.definition.macro)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue