Highlighting variable in backticks in JavaScript



  • Please, at the next update add variable highlighting in backticks

    `string ${variable} string` 
    


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

    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.


  • @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?



  • @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.


  • @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.



  • @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?



  • @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.



  • 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.


Log in to reply