Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Highlighting variable in backticks in JavaScript

    General Discussion
    6
    10
    250
    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.
    • Геннадий Карпук
      Геннадий Карпук last edited by

      Please, at the next update add variable highlighting in backticks

      `string ${variable} string` 
      
      PeterJones TomRobert 2 Replies Last reply Reply Quote 1
      • PeterJones
        PeterJones @Геннадий Карпук last edited by

        @Геннадий-Карпук

        Unfortunately, that’s unlikely to happen.

        1. Because Notepad++ uses a separate IP called “Scintilla” to handle the syntax highlighting and many other tasks inside Notepad++, and because Scintilla has stated that they are not updating their existing highlighters any more, focusing on the core IP rather than the syntax highlighting IP.
        2. Because this is a forum for the Community of users, and is not the official issue tracker, so no one here has the authority to act on any suggestions for the application, we just help each other use the product and comment on our opinions of feature requests and sometimes provide workarounds when possible. We have a FAQ entry that explains how to make official Feature Requests.
        dail 1 Reply Last reply Reply Quote 0
        • dail
          dail @PeterJones last edited by

          @PeterJones said in Highlighting variable in backticks in JavaScript:

          Scintilla has stated that they are not updating their existing highlighters any more

          What makes you say that?

          PeterJones 1 Reply Last reply Reply Quote 1
          • PeterJones
            PeterJones @dail last edited by

            @dail ,

            What makes you say that?

            Possibly-faulty memory?

            I thought I remembered seeing a scintilla issue (feature request or bug report) about a year or so ago where someone asked for a new lexer to be added to Scintilla, and they were told basically “we don’t do new lexers any more” … but I cannot immediately find it. But I see there are some recent lexer requests that do show signs that they haven’t been immediately closed.

            Sorry if I spread false information.

            So to @Геннадий-Карпук , I will rephrase #1:

            1. Because Notepad++ uses Scintilla’s IP, you should see if Scintilla’s most recent library supports those variables in JS code: you can download their SciTE editor which is the testbed showing off Scintilla features.
              • If SciTE/Scintilla does highlight string variables in backticks, then you can open a feature request for Notepad++ to update Scintilla versions to get that Scintilla feature (see FAQ already linked)
              • If ScitTE/Scintilla does not highlight string variables in backticks, you will have to open a bug report or feature request with Scintilla. Once it’s implemented, then you would have to open a feature request for Notepad++ to update Scintilla versions to get that Scintilla feature.
            dail 1 Reply Last reply Reply Quote 2
            • dail
              dail @PeterJones last edited by

              @PeterJones said in Highlighting variable in backticks in JavaScript:

              and they were told basically “we don’t do new lexers any more”

              With the move to Scintilla v5.0+ they split out the lexers into a separate library called Lexilla. It might have been more along the lines of ‘lets wait till we complete the changes needed to separate the lexers before integrating a new one’.

              Scintilla and Lexilla can be used individually, or (more commonly) together. Since the split out of the separate library they’ve at least added one new lexer and updated several others.

              PeterJones 1 Reply Last reply Reply Quote 2
              • PeterJones
                PeterJones @dail last edited by

                @dail

                It might have been more along the lines of ‘lets wait till we complete the changes needed to separate the lexers before integrating a new one’.

                That was probably it.

                Do you know if Notepad++ plans to move to the Scintilla v5.0+ anytime soon? And, if it does, will that mean that older plugin lexers (like the GEDCOM lexer and the one(s) that @Ekopalypse and @Bas-de-Reuver have been talking about in the recent custom lexer discussion will no longer work? Or does Scintilla v5 still allow older v4-compatible lexers to work?

                dail 1 Reply Last reply Reply Quote 2
                • dail
                  dail @PeterJones last edited by

                  @PeterJones said in Highlighting variable in backticks in JavaScript:

                  Do you know if Notepad++ plans to move to the Scintilla v5.0+ anytime soon?

                  No clue.

                  will that mean that older plugin lexers…will no longer work?

                  I’m not that familiar with how Scintilla handles external lexers (pre or post Lexilla split). I know part of the move to split out Lexilla was to allow more dynamic lexer loading, but I think that was more meant to load a compatible DLL with the correctly implemented interface. My inclination is that it would be unlikely for the older lexer plugins to work with out some sort of modification…though I could be wrong.

                  1 Reply Last reply Reply Quote 2
                  • Ekopalypse
                    Ekopalypse last edited by

                    The changes should be minimal as far as I remember.
                    Return the new ILexer version and define 3 more methods and
                    since these, Npp plugin lexers, are already dlls, it shouldn’t be a
                    problem either. But like dail, I haven’t done any testing yet.

                    1 Reply Last reply Reply Quote 3
                    • TomRobert
                      TomRobert @Геннадий Карпук last edited by

                      @Геннадий-Карпук said in Highlighting variable in backticks in JavaScript:

                      Please, at the next update add variable highlighting in backticks

                      `string ${variable} string` 
                      

                      Does anyone know, if this is planned for a future update? Or how to add it myself to Notepad++?

                      Michael Vincent 1 Reply Last reply Reply Quote 0
                      • Michael Vincent
                        Michael Vincent @TomRobert last edited by

                        @TomRobert said in Highlighting variable in backticks in JavaScript:

                        Does anyone know, if this is planned for a future update? Or how to add it myself to Notepad++?

                        This is most likely handled in Lexilla (the lexing component Scintilla used by Notepad++) so you would need to file a bug report there.

                        Cheers.

                        1 Reply Last reply Reply Quote 2
                        • First post
                          Last post
                        Copyright © 2014 NodeBB Forums | Contributors