Syntax Keywords
-
Can you add feature when you can add more groups in syntax keywords? (Unlimited groups) Thank you in advance!
-
can you add feature
No, we are fellow users. We can discuss new features, and the pros and cons, but we cannot make code changes or track official feature requests in this Community of Notepad++ users. (See our FAQ.)
add more groups in syntax keywords? (Unlimited groups)
That’s not likely to happen.
Notepad++ gets the number of keyword groups from each language from the library called “Lexilla”. Every lexer in Lexilla would have to be modified to accept and understand the extra keyword groups. The Lexilla group does not have the manpower (or desire) to give “unlimited” or even “a bunch of extra” groups to any given lexer. Considering there are dozens of independent lexers in Lexilla, they are not going to want to have to make the edit to all of them to support even “a bunch of extra groups”, let alone "unlimited’, for all the lexers. (If you wanted that feature, you’d have to ask Lexilla for it, they’d have to agree, then Notepad++ would have to incorporate the newer Lexilla and provide an interface for more than 8 sets of keywords on its end. I wouldn’t even bother with the request to Lexilla, if I were you. And either way, don’t bother with a Notepad++ feature request until Lexilla gives you that miracle, because there’s nothing Notepad++ can do to force Lexilla’s hand.)
Sorry.
Fortunately for you, @Ekopalypse has released an EnhanceAnyLexer plugin, which you can install from the Plugins Admin. This plugin allows you to make regex-based highlights in a file that has an active lexer. So you could make a bunch of regex like
(word1|word2|word3)
for your extra group#1,(more4|more5|more6)
for your extra group#2, and so on; each group would have keywords separated by the|
character, all wrapped inside parentheses()
. You can define a different foreground color for each of those regex, and you can have a separate set of regex for each lexer language.