[FEATURE] Syntax highlighting for R scripts (.R, .Rmd, .qmd) in the desktop app, like Python

Status Open
Maintainer reply None cached
Activity 0 comments · opened Oct 13, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

I use Claude Code in the desktop app (version 2.31226.1) for R work, such as analysis scripts and R Markdown/Quarto documents. Python files get proper syntax highlighting, but R scripts show up as plain, uncolored text.

This makes R code much harder to read and review: function calls, strings, comments, pipes (|> / %>%), assignments (<-) and formulas all look the same. When I'm checking what Claude changed in an R script, I have to open it in another editor (RStudio/Positron/VS Code) just to read it comfortably.

R is a major language in data science, statistics, and bioinformatics, so this affects a large group of users.

Proposed Solution

  • Add R as a supported language for syntax highlighting wherever code is shown in the desktop app (file previewer / Code tab, diffs, and code blocks), at the same level as Python.
  • Recognize common R file types: .R / .r, and ideally .Rmd and .qmd (R Markdown / Quarto, highlighting the R chunks), plus .Rprofile / .Renviron by filename.
  • Longer term, an option to add highlighting rules for languages that aren't built in. For example, letting users load TextMate grammars, the format Shiki uses. Shiki already ships an R grammar (r, MIT-licensed, sourced from Posit's Positron). According to the analysis in #66440, the desktop app already bundles Shiki grammars for rendered chat messages, so reusing that path for the previewer could cover R and many other languages at once.

Alternative Solutions

  • Opening R files in RStudio, Positron, or VS Code alongside Claude just to read them with highlighting. This works but breaks the flow of reviewing Claude's changes in the app.
  • Pasting R code into a chat message as an ```r code block, which is clunky for whole files.

Priority

Medium - Would be very helpful

Feature Category

Other

Use Case Example

  1. I open an R analysis project (for example, a data analysis workflow) in the desktop app.
  2. I ask Claude to refactor a script, such as analysis/01_qc.R.
  3. I open the edited .R file in the file previewer to review the result.
  4. Today it's plain text. With highlighting, I could quickly scan the pipes, function arguments, strings, and comments, and catch mistakes like an unclosed string or a misplaced argument, the same way I can with a .py file.

Additional Context

  • Possibly related: #66440. That issue was about the file previewer only highlighting a hardcoded set of extensions (C#, PHP, Java, etc. were missing). R (.r) was listed among the missing extensions in the root-cause comment. #66440 was closed as fixed, but R scripts still aren't highlighted for me, and this request is specifically about R support, so I'm opening it separately.
  • Shiki languages list: https://shiki.style/languages (includes r)
  • Shiki custom languages (TextMate grammars): https://shiki.style/guide/load-lang
  • Desktop app version: 2.31226.1

View original on GitHub ↗