1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-28 01:10:05 +08:00
SpaceVim/bundle/nvim-treesitter/queries/r/highlights.scm

125 lines
1.3 KiB
Scheme
Raw Normal View History

; highlights.scm
; Literals
(integer) @number
(float) @float
(complex) @number
(string) @string
(string (escape_sequence) @string.escape)
(comment) @comment
(identifier) @variable
(formal_parameters (identifier) @parameter)
(formal_parameters
(default_parameter name: (identifier) @parameter))
; Operators
[
"="
"<-"
"<<-"
"->"
] @operator
(unary operator: [
"-"
"+"
"!"
"~"
] @operator)
(binary operator: [
"-"
"+"
"*"
"/"
"^"
"<"
">"
"<="
">="
"=="
"!="
"||"
"|"
"&&"
"&"
":"
"~"
] @operator)
[
"|>"
(special)
] @operator
(lambda_function "\\" @operator)
[
"("
")"
"["
"]"
"{"
"}"
] @punctuation.bracket
(dollar "$" @operator)
(subset2
"[[" @punctuation.bracket
"]]" @punctuation.bracket)
[
"in"
(dots)
(break)
(next)
(inf)
] @keyword
[
(nan)
(na)
(null)
] @type.builtin
[
"if"
"else"
"switch"
] @conditional
[
"while"
"repeat"
"for"
] @repeat
[
(true)
(false)
] @boolean
"function" @keyword.function
(call function: (identifier) @function)
(default_argument name: (identifier) @parameter)
(namespace_get function: (identifier) @method)
(namespace_get_internal function: (identifier) @method)
(namespace_get namespace: (identifier) @namespace
"::" @operator)
(namespace_get_internal namespace: (identifier) @namespace
":::" @operator)
; Error
(ERROR) @error