chore: query formatting

This commit is contained in:
Pham Huy Hoang 2024-01-06 15:05:50 +09:00 committed by Christian Clason
parent 79975d6557
commit 57a8acf0c4
674 changed files with 18466 additions and 12648 deletions

View file

@ -1,40 +1,70 @@
; Allow OCaml highlighter
(ocaml) @none
; Regular expressions
(regexp_name) @variable
[(eof) (any)] @constant
[
(eof)
(any)
] @constant
(character) @character
(string) @string
(escape_sequence) @string.escape
(character_set "^" @punctuation.special)
(character_range "-" @punctuation.delimiter)
(character_set
"^" @punctuation.special)
(regexp_difference ["#"] @operator)
(regexp_repetition ["?" "*" "+"] @operator)
(regexp_alternative ["|"] @operator)
(character_range
"-" @punctuation.delimiter)
(regexp_difference
"#" @operator)
(regexp_repetition
[
"?"
"*"
"+"
] @operator)
(regexp_alternative
"|" @operator)
; Rules
(lexer_entry_name) @function
(lexer_argument) @variable.parameter
(lexer_entry ["=" "|"] @punctuation.delimiter)
(lexer_entry
[
"="
"|"
] @punctuation.delimiter)
; keywords
["and" "as" "let" "parse" "refill" "rule" "shortest"] @keyword
[
"and"
"as"
"let"
"parse"
"refill"
"rule"
"shortest"
] @keyword
; Punctuation
["[" "]" "(" ")" "{" "}"] @punctuation.bracket
[
"["
"]"
"("
")"
"{"
"}"
] @punctuation.bracket
; Misc
(comment) @comment @spell

View file

@ -1,5 +1,5 @@
((ocaml) @injection.content
(#set! injection.language "ocaml"))
(#set! injection.language "ocaml"))
((comment) @injection.content
(#set! injection.language "comment"))
(#set! injection.language "comment"))