Syntax highlighting in RStudio for rsthemes

Hi All,

I'm currently using RStudio: 2021.09.2 Build 382 (the latest version) on MacOS as of the time of this writing. I installed the fantastic rsthemes package by @grrrck for RStudio themes.

I then manually changed the theme to be "Material Ocean {rsthemes}" by manually selecting it from Tools > Options > Appearance.

I've attached a screenshot of the main code editor after this change.

The issue is that the function namespaces are not a different color, and no longer italicized as they were before I updated these settings. All code is largely colored white, which is not what I prefer (and not expected behavior for this theme).

Could anyone please explain how to rectify this? I may have made a mistake in changing the settings.

current session info

─ Session info ────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value                       
 version  R version 4.1.2 (2021-11-01)
 os       macOS Monterey 12.1         
 system   x86_64, darwin17.0          
 ui       RStudio                     
 language (EN)                        
 collate  en_US.UTF-8                 
 ctype    en_US.UTF-8                 
 tz       America/New_York            
 date     2022-02-07                  

─ Packages ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 package     * version date       lib source           
 cli           3.1.1   2022-01-20 [1] CRAN (R 4.1.2)   
 clipr         0.7.1   2020-10-08 [1] standard (@0.7.1)
 crayon        1.4.1   2021-02-08 [1] standard (@1.4.1)
 desc          1.4.0   2021-09-28 [1] CRAN (R 4.1.0)   
 details       0.2.1   2020-01-12 [1] CRAN (R 4.1.0)   
 httr          1.4.2   2020-07-20 [1] standard (@1.4.2)
 knitr         1.37    2021-12-16 [1] CRAN (R 4.1.0)   
 magrittr      2.0.2   2022-01-26 [1] CRAN (R 4.1.2)   
 png           0.1-7   2013-12-03 [1] standard (@0.1-7)
 R6            2.5.1   2021-08-19 [1] CRAN (R 4.1.0)   
 rprojroot     2.0.2   2020-11-15 [1] standard (@2.0.2)
 rstudioapi    0.13    2020-11-12 [1] CRAN (R 4.1.0)   
 sessioninfo   1.1.1   2018-11-05 [1] standard (@1.1.1)
 withr         2.4.2   2021-04-18 [1] standard (@2.4.2)
 xfun          0.29    2021-12-14 [1] CRAN (R 4.1.0)   
 xml2          1.3.2   2020-04-23 [1] standard (@1.3.2)

[1] /Library/Frameworks/R.framework/Versions/4.1/Resources/library


Can you check that the "Highlight R function calls" option is enabled in the Global Options > Code > Display settings?

Thank you @grrrck! That was the issue.

Really appreciate your kind help, and also thanks for creating the fantastic rsthemes package.

btw - do you think it is useful to add some info about this setting to the README of rsthemes? May help users new to the package get the most out of the cool themes if they have this option checked. If so, I'm happy to send a PR. Just a thought.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.