diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 1db526c65..4dd818dba 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -1818,7 +1818,7 @@ return { }, r = { install_info = { - revision = '0e6ef7741712c09dc3ee6e81c42e919820cc65ef', + revision = '8ac99ed1e7ad319737fc11dde20c07d1e1942383', url = 'https://github.com/r-lib/tree-sitter-r', }, maintainers = { '@ribru17' }, diff --git a/runtime/queries/r/highlights.scm b/runtime/queries/r/highlights.scm index c849dd838..91ef69bc9 100644 --- a/runtime/queries/r/highlights.scm +++ b/runtime/queries/r/highlights.scm @@ -117,7 +117,8 @@ function: (extract_operator (function_definition name: "\\" @operator) -(return) @keyword.return +((identifier) @keyword.return + (#eq? @keyword.return "return")) [ "if"