Community
    • Login

    Ruby Syntax highlight issue

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    syntax highlightnotepad++ v7.2
    3 Posts 2 Posters 2.5k 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.
    • dereiusD
      dereius
      last edited by

      Hy,

      I’m trying to use NPP to learn Ruby, because I feel comfortable to it, but I noticed the syntax highlight is a bit weird, limited. For example, it will give same color to a function name as to its argument, or when I call a class method, the class and the method have the same color and even the boolean (true/false) are the same color as other operators (def, end, return, etc).
      I don’t think this is the “right” syntax highlight, as I texted it in other editors (I even attached here a screenshot from Atom), so maybe it would worth investigating to see why it happens like this. Maybe the SciLexer.dll doesn’t address Ruby syntax in the proper way (is incomplete?)

      attached imgur link that shows the example: http://imgur.com/a/r5jya

      Thank you very much.

      1 Reply Last reply Reply Quote 0
      • gstaviG
        gstavi
        last edited by gstavi

        NPP is based on Scintilla. Almost all syntax highlighting lexers come from there.
        In addition, sadly, latest Scintilla is seldom merged into NPP.

        So:

        1. Try SciTE editor to see if ruby lexer has been improved lately.
        2. If not, find out author of Ruby lexer within Scintilla community and ask politely for improvements.
        3. Stand in line in NPP community and ask for merge with latest Scintilla.


        Alternatively, lexers can be added as plugins. But this is rather hard work. One can either write a lexer plugin from scratch or package existing scintilla lexer as plugin.

        Or just use ATOM.

        dereiusD 1 Reply Last reply Reply Quote 0
        • dereiusD
          dereius @gstavi
          last edited by

          @gstavi I brought this into attention of the Ruby Lexer dev within Scintilla. Hopefully it will be corrected.
          Thanks for the suggestions.

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