mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-21 12:50:09 -04:00
Run format-queries script
This commit is contained in:
parent
9a96c0fa61
commit
3b1ca8ef7a
1 changed files with 60 additions and 22 deletions
|
|
@ -1,75 +1,111 @@
|
||||||
;; Tree-sitter highlights for GROQ language
|
; Tree-sitter highlights for GROQ language
|
||||||
;; This file defines syntax highlighting for GROQ in Neovim
|
; This file defines syntax highlighting for GROQ in Neovim
|
||||||
|
; Keywords
|
||||||
;; Keywords
|
|
||||||
"select" @keyword
|
"select" @keyword
|
||||||
|
|
||||||
"asc" @keyword
|
"asc" @keyword
|
||||||
|
|
||||||
"desc" @keyword
|
"desc" @keyword
|
||||||
|
|
||||||
"in" @keyword.operator
|
"in" @keyword.operator
|
||||||
|
|
||||||
"match" @keyword.operator
|
"match" @keyword.operator
|
||||||
|
|
||||||
;; Operators
|
; Operators
|
||||||
"==" @operator
|
"==" @operator
|
||||||
|
|
||||||
"!=" @operator
|
"!=" @operator
|
||||||
|
|
||||||
">" @operator
|
">" @operator
|
||||||
|
|
||||||
">=" @operator
|
">=" @operator
|
||||||
|
|
||||||
"<" @operator
|
"<" @operator
|
||||||
|
|
||||||
"<=" @operator
|
"<=" @operator
|
||||||
|
|
||||||
"&&" @operator
|
"&&" @operator
|
||||||
|
|
||||||
"||" @operator
|
"||" @operator
|
||||||
|
|
||||||
"!" @operator
|
"!" @operator
|
||||||
|
|
||||||
"+" @operator
|
"+" @operator
|
||||||
|
|
||||||
"-" @operator
|
"-" @operator
|
||||||
|
|
||||||
"*" @operator
|
"*" @operator
|
||||||
|
|
||||||
"/" @operator
|
"/" @operator
|
||||||
|
|
||||||
"%" @operator
|
"%" @operator
|
||||||
|
|
||||||
"**" @operator
|
"**" @operator
|
||||||
|
|
||||||
".." @operator
|
".." @operator
|
||||||
|
|
||||||
"..." @operator
|
"..." @operator
|
||||||
|
|
||||||
"=>" @operator
|
"=>" @operator
|
||||||
|
|
||||||
"->" @operator
|
"->" @operator
|
||||||
|
|
||||||
"|" @operator
|
"|" @operator
|
||||||
|
|
||||||
;; Punctuation
|
; Punctuation
|
||||||
"(" @punctuation.bracket
|
"(" @punctuation.bracket
|
||||||
|
|
||||||
")" @punctuation.bracket
|
")" @punctuation.bracket
|
||||||
|
|
||||||
"[" @punctuation.bracket
|
"[" @punctuation.bracket
|
||||||
|
|
||||||
"]" @punctuation.bracket
|
"]" @punctuation.bracket
|
||||||
|
|
||||||
"{" @punctuation.bracket
|
"{" @punctuation.bracket
|
||||||
|
|
||||||
"}" @punctuation.bracket
|
"}" @punctuation.bracket
|
||||||
|
|
||||||
"," @punctuation.delimiter
|
"," @punctuation.delimiter
|
||||||
|
|
||||||
":" @punctuation.delimiter
|
":" @punctuation.delimiter
|
||||||
|
|
||||||
"." @punctuation.delimiter
|
"." @punctuation.delimiter
|
||||||
|
|
||||||
;; Literals
|
; Literals
|
||||||
(string) @string
|
(string) @string
|
||||||
|
|
||||||
(number) @number
|
(number) @number
|
||||||
|
|
||||||
(true) @boolean
|
(true) @boolean
|
||||||
|
|
||||||
(false) @boolean
|
(false) @boolean
|
||||||
|
|
||||||
(null) @constant.builtin
|
(null) @constant.builtin
|
||||||
|
|
||||||
;; Special references
|
; Special references
|
||||||
(star) @constant.builtin
|
(star) @constant.builtin
|
||||||
|
|
||||||
(parent) @constant.builtin
|
(parent) @constant.builtin
|
||||||
|
|
||||||
(this) @constant.builtin
|
(this) @constant.builtin
|
||||||
|
|
||||||
;; Identifiers
|
; Identifiers
|
||||||
(identifier) @variable
|
(identifier) @variable
|
||||||
|
|
||||||
;; Parameters
|
; Parameters
|
||||||
(parameter) @variable.parameter
|
(parameter) @variable.parameter
|
||||||
|
|
||||||
;; Function calls
|
; Function calls
|
||||||
(function_call
|
(function_call
|
||||||
(identifier) @function)
|
(identifier) @function)
|
||||||
|
|
||||||
(order_function
|
(order_function
|
||||||
"order" @function.builtin)
|
"order" @function.builtin)
|
||||||
|
|
||||||
;; Comments
|
; Comments
|
||||||
(comment) @comment
|
(comment) @comment
|
||||||
|
|
||||||
;; Projections and objects
|
; Projections and objects
|
||||||
(projection
|
(projection
|
||||||
"{" @punctuation.bracket
|
"{" @punctuation.bracket
|
||||||
"}" @punctuation.bracket)
|
"}" @punctuation.bracket)
|
||||||
|
|
@ -78,32 +114,34 @@
|
||||||
"{" @punctuation.bracket
|
"{" @punctuation.bracket
|
||||||
"}" @punctuation.bracket)
|
"}" @punctuation.bracket)
|
||||||
|
|
||||||
;; Conditional projections
|
; Conditional projections
|
||||||
(conditional_projection
|
(conditional_projection
|
||||||
"=>" @operator)
|
"=>" @operator)
|
||||||
|
|
||||||
;; Select statements
|
; Select statements
|
||||||
(select_statement
|
(select_statement
|
||||||
"..." @operator
|
"..." @operator
|
||||||
"select" @keyword
|
"select" @keyword
|
||||||
"=>" @operator)
|
"=>" @operator)
|
||||||
|
|
||||||
;; Spread operators
|
; Spread operators
|
||||||
(spread_operator
|
(spread_operator
|
||||||
"..." @operator)
|
"..." @operator)
|
||||||
|
|
||||||
;; Array access
|
; Array access
|
||||||
(attribute_access
|
(attribute_access
|
||||||
"." @punctuation.delimiter)
|
"." @punctuation.delimiter)
|
||||||
|
|
||||||
;; String keys in projections/objects
|
; String keys in projections/objects
|
||||||
(pair
|
(pair
|
||||||
(literal (string) @property))
|
(literal
|
||||||
|
(string) @property))
|
||||||
|
|
||||||
;; Highlight field names in projections
|
; Highlight field names in projections
|
||||||
(projection (identifier) @property)
|
(projection
|
||||||
|
(identifier) @property)
|
||||||
|
|
||||||
;; Built-in functions (essential GROQ functions)
|
; Built-in functions (essential GROQ functions)
|
||||||
(function_call
|
(function_call
|
||||||
(identifier) @function.builtin
|
(identifier) @function.builtin
|
||||||
(#eq? @function.builtin "count"))
|
(#eq? @function.builtin "count"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue