mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-20 20:30:05 -04:00
chore: query formatting
This commit is contained in:
parent
79975d6557
commit
57a8acf0c4
674 changed files with 18466 additions and 12648 deletions
|
|
@ -1,54 +1,56 @@
|
|||
;; Variables
|
||||
; Variables
|
||||
(list
|
||||
(symbol) @variable)
|
||||
|
||||
(list (symbol) @variable)
|
||||
(cons
|
||||
(symbol) @variable)
|
||||
|
||||
(cons (symbol) @variable)
|
||||
(scope
|
||||
(symbol) @variable)
|
||||
|
||||
(scope (symbol) @variable)
|
||||
|
||||
(symbind (symbol) @variable)
|
||||
|
||||
;; Constants
|
||||
(symbind
|
||||
(symbol) @variable)
|
||||
|
||||
; Constants
|
||||
((symbol) @constant
|
||||
(#lua-match? @constant "^_*[A-Z][A-Z0-9_]*$"))
|
||||
|
||||
;; Functions
|
||||
|
||||
(list
|
||||
. (symbol) @function)
|
||||
|
||||
;; Namespaces
|
||||
; Functions
|
||||
(list
|
||||
.
|
||||
(symbol) @function)
|
||||
|
||||
; Namespaces
|
||||
(symbind
|
||||
(symbol) @module
|
||||
. (keyword))
|
||||
|
||||
;; Includes
|
||||
.
|
||||
(keyword))
|
||||
|
||||
; Includes
|
||||
((symbol) @keyword.import
|
||||
(#any-of? @keyword.import "use" "import" "load"))
|
||||
|
||||
;; Keywords
|
||||
|
||||
; Keywords
|
||||
((symbol) @keyword
|
||||
(#any-of? @keyword "do" "doc"))
|
||||
|
||||
;; Special Functions
|
||||
|
||||
; Special Functions
|
||||
; Keywords construct a symbol
|
||||
|
||||
(keyword) @constructor
|
||||
|
||||
((list
|
||||
. (symbol) @keyword.function
|
||||
. (symbol) @function
|
||||
.
|
||||
(symbol) @keyword.function
|
||||
.
|
||||
(symbol) @function
|
||||
(symbol)? @variable.parameter)
|
||||
(#any-of? @keyword.function "def" "defop" "defn" "fn"))
|
||||
|
||||
((cons
|
||||
. (symbol) @keyword.function
|
||||
. (symbol) @function
|
||||
.
|
||||
(symbol) @keyword.function
|
||||
.
|
||||
(symbol) @function
|
||||
(symbol)? @variable.parameter)
|
||||
(#any-of? @keyword.function "def" "defop" "defn" "fn"))
|
||||
|
||||
|
|
@ -58,33 +60,38 @@
|
|||
((symbol) @function.macro
|
||||
(#any-of? @function.macro "op" "current-scope" "quote" "let" "provide" "module" "or" "and" "curryfn" "for" "$" "linux"))
|
||||
|
||||
;; Conditionals
|
||||
|
||||
; Conditionals
|
||||
((symbol) @keyword.conditional
|
||||
(#any-of? @keyword.conditional "if" "case" "cond" "when"))
|
||||
|
||||
;; Repeats
|
||||
|
||||
; Repeats
|
||||
((symbol) @keyword.repeat
|
||||
(#any-of? @keyword.repeat "each"))
|
||||
|
||||
;; Operators
|
||||
; Operators
|
||||
((symbol) @operator
|
||||
(#any-of? @operator "&" "*" "+" "-" "<" "<=" "=" ">" ">="))
|
||||
|
||||
((symbol) @operator (#any-of? @operator "&" "*" "+" "-" "<" "<=" "=" ">" ">="))
|
||||
; Punctuation
|
||||
[
|
||||
"("
|
||||
")"
|
||||
] @punctuation.bracket
|
||||
|
||||
;; Punctuation
|
||||
[
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
||||
|
||||
[ "(" ")" ] @punctuation.bracket
|
||||
|
||||
[ "{" "}" ] @punctuation.bracket
|
||||
|
||||
[ "[" "]" ] @punctuation.bracket
|
||||
[
|
||||
"["
|
||||
"]"
|
||||
] @punctuation.bracket
|
||||
|
||||
((symbol) @punctuation.delimiter
|
||||
(#eq? @punctuation.delimiter "->"))
|
||||
|
||||
;; Literals
|
||||
|
||||
; Literals
|
||||
(string) @string
|
||||
|
||||
(escape_sequence) @string.escape
|
||||
|
|
@ -100,10 +107,7 @@
|
|||
(null)
|
||||
] @constant.builtin
|
||||
|
||||
[
|
||||
"^"
|
||||
] @character.special
|
||||
|
||||
;; Comments
|
||||
"^" @character.special
|
||||
|
||||
; Comments
|
||||
(comment) @comment @spell
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue