mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-21 12:50:09 -04:00
This was copied from the parser repo, but is pointless in this context. The folder structure denotes what the file is.
129 lines
1.8 KiB
Scheme
129 lines
1.8 KiB
Scheme
; Keywords
|
|
[
|
|
"select"
|
|
"asc"
|
|
"desc"
|
|
] @keyword
|
|
|
|
[
|
|
"in"
|
|
"match"
|
|
] @keyword.operator
|
|
|
|
; Operators
|
|
[
|
|
"=="
|
|
"!="
|
|
">"
|
|
">="
|
|
"<"
|
|
"<="
|
|
"&&"
|
|
"||"
|
|
"!"
|
|
"+"
|
|
"-"
|
|
"*"
|
|
"/"
|
|
"%"
|
|
"**"
|
|
".."
|
|
"..."
|
|
"=>"
|
|
"->"
|
|
"|"
|
|
] @operator
|
|
|
|
; Punctuation
|
|
[
|
|
"("
|
|
")"
|
|
"["
|
|
"]"
|
|
"{"
|
|
"}"
|
|
] @punctuation.bracket
|
|
|
|
[
|
|
","
|
|
":"
|
|
"."
|
|
] @punctuation.delimiter
|
|
|
|
; Literals
|
|
(string) @string
|
|
|
|
(number) @number
|
|
|
|
(true) @boolean
|
|
|
|
(false) @boolean
|
|
|
|
(null) @constant.builtin
|
|
|
|
; Special references
|
|
(star) @constant.builtin
|
|
|
|
(parent) @constant.builtin
|
|
|
|
(this) @constant.builtin
|
|
|
|
; Identifiers
|
|
(identifier) @variable
|
|
|
|
; Parameters
|
|
(parameter) @variable.parameter
|
|
|
|
; Function calls
|
|
(function_call
|
|
(identifier) @function)
|
|
|
|
(order_function
|
|
"order" @function.builtin)
|
|
|
|
; Comments
|
|
(comment) @comment @spell
|
|
|
|
; Projections and objects
|
|
(projection
|
|
"{" @punctuation.bracket
|
|
"}" @punctuation.bracket)
|
|
|
|
(object
|
|
"{" @punctuation.bracket
|
|
"}" @punctuation.bracket)
|
|
|
|
; Conditional projections
|
|
(conditional_projection
|
|
"=>" @operator)
|
|
|
|
; Select statements
|
|
(select_statement
|
|
"..." @operator
|
|
"select" @keyword
|
|
"=>" @operator)
|
|
|
|
; Spread operators
|
|
(spread_operator
|
|
"..." @operator)
|
|
|
|
; Array access
|
|
(attribute_access
|
|
"." @punctuation.delimiter)
|
|
|
|
; String keys in projections/objects
|
|
(pair
|
|
(literal
|
|
(string) @property))
|
|
|
|
; Highlight field names in projections
|
|
(projection
|
|
(identifier) @property)
|
|
|
|
; Built-in functions (essential GROQ functions)
|
|
(function_call
|
|
(identifier) @function.builtin
|
|
(#any-of? @function.builtin
|
|
"count" "length" "defined" "references" "now" "dateTime" "coalesce" "unique" "max" "min" "sum"
|
|
"avg" "round" "floor" "ceil" "abs" "sqrt" "upper" "lower" "string" "number" "boolean" "array"
|
|
"object" "type" "global" "sanity" "path" "delta" "after" "before"))
|