Community
    • Login

    R Syntax highlighting for dark themes

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    syntax highlightrlangsyntax
    4 Posts 2 Posters 33.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Dheeraj AgarwalD
      Dheeraj Agarwal
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • dailD
        dail
        last edited by

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

        1 Reply Last reply Reply Quote 0
        • Dheeraj AgarwalD
          Dheeraj Agarwal
          last edited by

          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?

          1 Reply Last reply Reply Quote 0
          • dailD
            dail
            last edited by dail

            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.

            1 Reply Last reply Reply Quote 1
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors