From 2ec268b5d05e571237ae017519601e7b7529b8d5 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Fri, 22 May 2026 00:07:29 +0200 Subject: [PATCH] feat(r)!: update parser and queries Breaking change: remove node `(return)` in favor of `(identifier)` --- lua/nvim-treesitter/parsers.lua | 2 +- runtime/queries/r/highlights.scm | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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"