R Syntax highlighting for dark themes



  • Hi,

    I am able to see R syntax highlights whenever I choose R from the language Menu and the default theme for NPP is there. However, as soon as I change to a dark theme like Monokai, I lose all syntax highlighting. I have tried re-selecting from language menu and also saving the file with .R extension.

    Please advise.



  • That means those themes don’t have any support for R yet.



  • Is there a way, this can be fixed on my own? Any pointers would be appreciated. I vaguely remember I was using an older version where I did not find the issue. However from past few versions, i have noticed the dark themes don’t work.

    How can I enhance this on my own?



  • You are able to add this in on your own. Take a look at this section of the default theme. If you copy and paste this into another theme (for example Monokai.xml) which does not have a LexerType for R yet, you will then be able to highlight R with that style. However this will still have the color/style of whatever the default theme is using which won’t match Monokai. So you can either edit the pasted XML manually to get appropriate colors, or once you paste that into the xml file and start Notepad++ you will be able to edit the style for R using the Style Configurator.