IDE 25 Release Notes ==================== We present here a few highlights of the new features in IDE products for the 25 release. .. contents:: :local: Ada Language Server for GPR files --------------------------------- A separate Ada Language Server instance is now launched specifically for GPR files, providing common IDE features such as completion, outline, tooltips, and navigation in GPR files via the LSP. This helps editing and understanding project files directly from GNAT Studio or Visual Studio Code. .. image:: ../../ide/sources/images/gpr_support.gif :width: 400pt SPARK in VS Code ---------------- A few improvements have been made in the VS Code extension regarding SPARK integration. In particular `predefined tasks `_ for GNATprove have been added in order to prove a subprogram, a file or the whole project. In addition, the extension will now display code lenses above subprograms and files to prove code directly from an opened editor. .. image:: ../../ide/sources/images/spark_codelens.gif :width: 400pt GNATtest in VS Code ------------------- An integration for GNATtest is now available through the Ada & SPARK VS Code extension, providing the following functionalities: predefined tasks to create/update test skeletons for the loaded project, and allowing you to run and visualize all your tests from the VS Code `Testing `_ view. .. image:: ../../ide/sources/images/gnattest-test-tree.png :width: 400pt Project Diagnostics ------------------- The Ada Language Server now emits diagnostics for all the warnings and errors that were found while loading a project. These diagnostics are shown in GNAT Studio's `Locations` view and VS Code's `Problems` panel. These diagnostics can be disabled via a GNAT Studio preference (`Enable project diagnostics` in the `Editor/Ada/Diagnostics` preferences page) or, if you are using the Ada & SPARK VS Code extension, via the `Ada: Project Diagnostics` setting. .. image:: ../../ide/sources/images/project_diagnostics.gif :width: 400pt Formatting ---------- The Ada Language Server now relies on a new formatter called `GNATformat `_, replacing the old GNATpp formatter, which will be baselined soon. This formatter is based on the `Prettier `_ formatter engine, which has been ported to Ada. The intent of GNATformat is to format valid Ada source code according to the coding style described in the `GNAT Coding Style guide `_. The ability to customize the formatting style through configuration files will be progressively added in the next GNATformat versions. .. image:: ../../ide/sources/images/formatting_vscode.png :width: 400pt The VS Code extension for Ada & SPARK now uses GNATformat by default but users can fallback to GNATpp by disabling the *Ada: Use GNATformat* setting. Regarding GNAT Studio, GNATformat is disabled by default until the complete transition to this new formatter, including preferences and formatting of whole projects. You can still experiment with it for file and range formatting based on the LSP by enabling the *GPS.LSP.FORMATTING.ADA* trace. Editing and Completion ---------------------- Tooltips for attributes, aspects and pragmas are now supported in the Ada Language Server. .. image:: ../../ide/sources/images/tooltips_attributes.gif :width: 400pt Selecting completion items that are not visible in the current scope will now automatically trigger the Ada Language Server's *auto-import* command, adding the missing with clauses and prefixing with a qualifier if needed. This can be disabled via the *Insert with clauses* preference, in the *Editor/Ada* preferences page. .. image:: ../../ide/sources/images/invisible_completion.gif :width: 400pt LSP-based Semantic Highlighting is now available in GNAT Studio. This allows to highlight differently more fine-grained semantic categories, for instance to distinguish constants from writable variables. You can enable this feature via the *LSP Semantic Highlighting* preference in the *LSP* preferences page. The colors for each category can then be customized through the *Semantic* section of the *Editor/Fonts & Colors* preferences page. .. image:: ../../ide/sources/images/semantic_highlighting.png :width: 400pt Debugging --------- GNAT Studio now supports `Microsoft's Debug Adapter Protocol `_ to debug Ada code. The idea behind the *Debug Adapter Protocol* is to standardize an abstract protocol for how a development tool communicates with concrete debuggers, similarly to what the *LSP* does for languages. This makes interactions with underlying debuggers faster and more reliable in the long-run. The implementation has some limitations for now, in particular regarding remote debugging: thus it needs to activated manually by enabling the *GPS.DEBUGGING.DAP_MODULE* trace. You will also need a recent GDB version (25 release at least) to benefit from the best user experience. .. image:: ../../ide/sources/images/dap_debugging.gif :width: 400pt Using the DAP module comes with a few UX improvements: the *Call Stack* view now will automatically select the first reachable frame, opening its source location, and will gray out the frames that are not accessible (i.e: when the source path does not exist on disk). Alire integration ----------------- When opening a .gpr file belonging to an `Alire `_ project (i.e: when the project's directory contains an ``alire.toml`` file), GNAT Studio is now able to correctly load it by running the ``alr printenv`` command to set up the needed environment, displaying a message in the *Locations* view once it's setup. The default build targets to build and clean projects are also replaced by the respective Alire commands (``alr build`` and ``alr clean``). .. image:: ../../ide/sources/images/alire_project_gs.png :width: 400pt On the VS Code extension's side, a few bugs have been fixed regarding the Alire integration. In particular the Ada Language Server for GPR files is now also able to load Alire projects. Note that all the predefined tasks provided by the Ada & SPARK VS Code extension will run through Alire: for instance, the *ada: Build current project* task will run the ``alr build`` command and tasks that spawn external tools will be prefixed by ``alr exec``.