Community
    • Login

    Highlighting variable in backticks in JavaScript

    Scheduled Pinned Locked Moved General Discussion
    12 Posts 6 Posters 1.1k 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.
    • dailD
      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?

      PeterJonesP 1 Reply Last reply Reply Quote 1
      • PeterJonesP
        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.
        dailD 1 Reply Last reply Reply Quote 2
        • dailD
          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.

          PeterJonesP 1 Reply Last reply Reply Quote 2
          • PeterJonesP
            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?

            dailD 1 Reply Last reply Reply Quote 2
            • dailD
              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
              • EkopalypseE
                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
                • TomRobertT
                  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 VincentM 1 Reply Last reply Reply Quote 0
                  • Michael VincentM
                    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.

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

                      The bug seems fixed:

                      https://github.com/ScintillaOrg/lexilla/issues/114
                      

                      But I don’t see any change in Notepad++ yet?

                      PeterJonesP 1 Reply Last reply Reply Quote 0
                      • PeterJonesP
                        PeterJones @TomRobert
                        last edited by PeterJones

                        @TomRobert said in Highlighting variable in backticks in JavaScript:

                        The bug seems fixed:

                        https://github.com/ScintillaOrg/lexilla/issues/114
                        

                        But I don’t see any change in Notepad++ yet?

                        … And if you follow the various links, the commit that fixed it was tagged in rel-5-3-1 two weeks ago. So it is unsurprising that Notepad++ hasn’t yet updated it’s Lexilla instance and made a release.

                        Update: nevermind, that was merged into Notepad++ last week. Have you checked to see if it’s in v8.6.5 release candidate? Like say in item 6 of those release notes

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