mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 10:50:06 -04:00
chore: query formatting
This commit is contained in:
parent
79975d6557
commit
57a8acf0c4
674 changed files with 18466 additions and 12648 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue