Group keywords operators and punctuation

This commit is contained in:
Alan Russell 2025-07-18 07:57:40 +01:00
parent 16e0b1ae24
commit a94f00603e
No known key found for this signature in database

View file

@ -1,75 +1,56 @@
; 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"
"asc"
"desc"
] @keyword
"asc" @keyword [
"in"
"desc" @keyword "match"
] @keyword.operator
"in" @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
; Punctuation ; Punctuation
"(" @punctuation.bracket [
"("
")"
"["
"]"
"{"
"}"
] @punctuation.bracket
")" @punctuation.bracket [
","
"[" @punctuation.bracket ":"
"."
"]" @punctuation.bracket ] @punctuation.delimiter
"{" @punctuation.bracket
"}" @punctuation.bracket
"," @punctuation.delimiter
":" @punctuation.delimiter
"." @punctuation.delimiter
; Literals ; Literals
(string) @string (string) @string