nvim-treesitter/queries/r/highlights.scm
2021-03-16 18:52:43 +01:00

86 lines
804 B
Scheme
Executable file

; highlights.scm
(call function: (identifier) @function)
(namespace_get function: (identifier) @method)
(namespace_get_internal function: (identifier) @method)
; Literals
(integer) @number
(float) @number
(complex) @number
(string) @string
(comment) @comment
(formal_parameters (identifier) @parameter)
(identifier) @variable
; Operators
[
"="
"<-"
"<<-"
"->"
] @operator
(unary operator: [
"-"
"+"
"!"
"~"
] @operator)
(binary operator: [
"-"
"+"
"*"
"/"
"^"
"<"
">"
"<="
">="
"=="
"!="
"||"
"|"
"&&"
"&"
":"
"~"
] @operator)
(special) @operator
[
"("
")"
"["
"]"
"{"
"}"
] @punctuation.bracket
[
"while"
"if"
"else"
"function"
"repeat"
"for"
"in"
(dots)
(true)
(false)
(break)
(next)
(inf)
(nan)
(na)
(null)
] @keyword