fix(r): resolve highlight regressions

This commit is contained in:
Riley Bruins 2024-06-28 21:52:23 -07:00 committed by Christian Clason
parent fa19150d00
commit f0e3b5c5fe
2 changed files with 15 additions and 9 deletions

View file

@ -51,6 +51,7 @@
"$"
"@"
":"
"!"
"special"
] @operator
@ -86,6 +87,12 @@
(call
function: (identifier) @function.call)
(extract_operator
rhs: (identifier) @variable.member)
function: (extract_operator
rhs: (identifier) @function.method.call)
; Parameters
(parameters
(parameter
@ -110,12 +117,7 @@
(function_definition
name: "\\" @operator)
[
"in"
(return)
(next)
(break)
] @keyword
(return) @keyword.return
[
"if"
@ -126,6 +128,9 @@
"while"
"repeat"
"for"
"in"
(break)
(next)
] @keyword.repeat
[

View file

@ -23,14 +23,14 @@ b <- list(name = "r", version = R.version$major)
# ^ @variable.parameter
# ^ @string
# ^ @operator
# ^ @variable
# ^ @variable.member
Lang$new(name = "r")$print()
# ^ @variable
# ^ @function.method.call
for(i in 1:10) {
# <- @keyword.repeat
# ^ @keyword
# ^ @keyword.repeat
}
add <- function(a, b = 1, ...) {
@ -39,6 +39,7 @@ add <- function(a, b = 1, ...) {
# ^ @variable.parameter
# ^ @constant.builtin
return(a + b)
# ^ @keyword.return
}
base::letters