Community
    • Login

    UDL specification for Ada

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    ada udl
    4 Posts 2 Posters 311 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.
    • Ron WR
      Ron W
      last edited by

      I want to modify the highlighting for Ada. Is there a UDL spec for Ada?

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

        @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.
        PeterJonesP 1 Reply Last reply Reply Quote 3
        • PeterJonesP
          PeterJones @PeterJones
          last edited by

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

          Ron WR 1 Reply Last reply Reply Quote 2
          • Ron WR
            Ron W @PeterJones
            last edited by

            Thanks for your reply. I will look into those.

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