4
votes

I love Notepad++ and use it often for many languages including c/c++, java, and Ada. The most troubling issue I have run into is the lack of support for Ada. There is no built-in code folding or function list support. Trying to find any Ada support for NP++ on the web has been difficult to say the least. Does anyone know of anything I can look at as far as integrating Ada support into NP++? Or any place that I might submit some of the things I have developed myself? I don't want to believe I am the only one out there with this.

Adding the following parser to the functionList.xml file seems to work well for generating a function list for Ada Hope someone else will find this useful

<!-- Notepad++ provided Ada support is very limited, to that end I am attempting to add more robust capabilities. -->
<parser id="ada_function" displayName="Ada source" commentExpr="(--.*?$)">
    <function
            mainExpr="^[\t ]*(function|procedure)[\t ]+[^\r\n]*$"
            displayMode="$functionName">
        <functionName>
            <nameExpr expr="[_A-Za-z]?[\w_]*[\s]*\(|[_A-Za-z]?[\w_]*[\s]*\;|[_A-Za-z]?[\w_]*[\s]*return|[_A-Za-z]?[\w_]*[\s]is|[_A-Za-z]?[\w_]*[\s]*$"/>
            <nameExpr expr="[_A-Za-z]?[\w_]*"/>
        </functionName>
    </function>
</parser>
4
Before this gets closed: I would recommend you look into a IDE (integrated development environment) for Ada. For example there is an ada eclipse plugin: sourceforge.net/projects/ideada. Just search for ada ide and you might find more. - randers
Some alternatives, which support Ada more or less out of the box: GNAT-GPS, Emacs, Vim, AdaGIDE. - Jacob Sparre Andersen
Thanks for your recommendation. Unfortunately, given the environment in which I work, I am limited in the tools I can use. I don't have to work with Ada very much so the features of notepad++ that work well with other languages would be very helpful if they worked for Ada. I have the Tornado IDE, but it is a bit cumbersome for the little bit I work with Ada. - J.Dis
In case anyone looking for an answer stumbles here, AdaCore has a VS Code plugin for Ada development. It works fairly well. - ATL_DEV

4 Answers

1
votes

The Ada Reference Manuals (or other documents persuant to them) contain the BNF language syntax definition. There may be scripts or utilities available that allow the appropriate NP++ syntax configuration to be generated from the BNF.

Vim has Ada syntax highlighting by default, so it has been done before. I too would be interested in having this facility in NP++.

1
votes

I've also done Ada development in Windows, but not with NP++. For that I used the Atom editor, that thing has tons of support via it's plugins. NP++ is great, very lightweight, but also sparse on a number of niche features.

NP++ is great, but not for Ada development, imo.

1
votes

I can recommend using GPS GNAT instead of Notepad++. The Ada support is just great. The community edition does not cost any money.

1
votes

I would suggest using VS Code for light Ada Development, as there are couple of extensions available for Ada in the Marketplace. One of them is developed by AdaCore itself. They have some useful features like code-completion, code folding, etc.

There is also a 'Lightweight Editor for Ada - LEA', based on the Scintilla editor widget (like Notepad++) :

https://sourceforge.net/projects/l-e-a/