GNAT Studio 23 Release Notes

We present here a few highlights of the new features in GNAT Studio 23. This GNAT Studio development cycle was focused on improving LSP support, in particular regarding refactoring capabilities and stabilizing the already existing features.

Refactorings

Some new refactoring tools are now available in GNAT Studio.

You can find a list of all the Ada-specific refactorings provided by the Ada Language Server, with some GIFs showing how they work, here.

All these refactorings are available through what the LSP calls Code Actions. They are available via the light-bulb that appears on the left-side of the current editor when placing the cursor on a place where these refactorings can work (e.g: within a subprogram declaration for the Add Parameter refactoring).

_images/pull_up_decl.gif

The rename refactoring has also been improved: it now also renames the corresponding files when renaming an Ada package, taking into account the project’s naming scheme.

Editing and Completion

New convenience features have been added to handle string literals and comments in GNAT Studio.

You can now use Shift-Enter to continue writing a multi-line comment, without having to type ‘– ‘.

_images/comment_continue.gif

The same combination can be used to continue the writing of a string literal on the following line:

_images/string_continue.gif

You can also use Shift-Space to split a string in two, allowing you to insert a variable you want to print for instance, or you can directly use Shift-Control-V to insert a variable name already present in your clipboard.

_images/copy_var_string.gif

GNAT Studio now formats the snippets inserted when completing parameters. This feature can be enabled by adding the following line to your $HOME/ada_ls_traces.cfg` (or %USERPROFILE%.gnatstudioada_ls_traces.cfg on Windows):

ALS.COMPLETION.FORMATTING=yes

_images/formatted_completion.gif

C & C++ Support

GNAT Studio no longer overrides .clangd-format files that are already present in the project’s source directories, allowing users to customize the formatting options as they want. GNAT Studio will only create the needed .clangd-format files when not present, using the user’s C/C++ formatting preferences.

The mechanism to customize C/C++ formatting options is now described in the Editor/C & C++ preferences page.

GNAT Studio now uses clangd 14 as a C/C++ underlying engine: you can find the corresponding clangd’s release notes.

Miscellaneous UI/UX improvements

A new Help ‣ Create Bug Report menu has been introduced to help you creating a bug report archive (tar.gz archive file) that includes all the information you can provide. You can then send it to report@adacore.com if you are supported user, with a description of the issue you are facing.

_images/bug_report_dialog.png

A search entry is now displayed in the Messages view toolbar (and other output consoles), allowing the user to search for the next occurrence of the entered pattern. Pressing ENTER will go to the next occurrence, until it reaches the end of the buffer: it will then restart the search from the beginning.

_images/search_messages.png

Drag’n’drop is now available on the signature help window, allowing it to be moved around.

_images/dnd_signature.gif