UDL specification for Ada
-
I want to modify the highlighting for Ada. Is there a UDL spec for Ada?
-
@Ron-W ,
Is there a UDL spec for Ada?
There aren’t typically pre-made UDL for languages that have a lexer built into Notepad++ – unless it was for a language that previously didn’t have a builtin lexer but now does. The User Defined Languages Collection does not contain an Ada UDL definition. If you make one, feel free to submit it to the Collection so it’s available to other users who might find the builtin Ada lexer lacking.
I want to modify the highlighting for Ada
How do you want to modify it?
- If you just want to add your own keywords, Settings > Style Configurator > ADA > INSTRUCTION WORD has a user-defined-keywords box you can utilize to add more keywords.
- Or if you dig into the LexAda.cxx source code, similar to my recent example for SQL, you might find that the Ada lexer already has more style categories that Notepad++ isn’t showing in Style Configurator, in which case you can follow my example in that SQL discussion, you could change stylers.xml or your themeName.xml to add that row to the Style Configurator.
- If there aren’t any hidden styles, but you want your own keywords highlighted in a different foreground color than the normal INSTRUCTION WORD, you could use the EnhaceAnyLexer to do regex-based definitions for setting foreground colors
- If you wanted to change anything complicated, making a UDL copy wouldn’t work for you anyway, because UDL doesn’t have all the possibilities that a custom lexer has
- If it’s a complicated change that none of the above handle, you could submit a feature request issue to the Lexilla project’s
LexAda.cxx
(and better, link a PR to that issue, with the fix implemented for them), and if they implemented/accepted it, it would eventually make it into Notepad++ the next time N++ updates its copy of Lexilla.
-
@PeterJones said in UDL specification for Ada:
you might find that the Ada lexer already has more style categories that Notepad++ isn’t showing
I was curious, so took a look when I had a chance. Based on the styler categories defined for Ada, there aren’t any hidden styler categories that can be used. So you’d have to go down one of the other routes I listed. Sorry.
-
Thanks for your reply. I will look into those.