A recap of Quarkus Tools for IntelliJ's latest improvements
Quarkus Tools for IntelliJ is a free and open source extension, helping users develop Quarkus applications by providing content-assist, validation, run configurations and many other features right from their favourite IDE.
This extension is based on the LSP4MP (i.e. MicroProfile) and its Quarkus add-on, and the Qute language server. These are all used in our popular Quarkus Tools extension for Visual Studio Code.
Over the past five months, we’ve been really hard at work to improve Quarkus Tools in every possible way, averaging about one release every two weeks.
We’ve been focusing on performance improvements, Quarkus 3.x with JakartaEE namespace support, Qute templating support, and generally trying to keep Quarkus Tools out of your way. So let’s look in more details at what was accomplished.
Increased stability and performance
We’ve addressed various critical issues in our custom Language Server client (LSP4IJ), that previously caused Language Servers to freeze IntelliJ IDEA. Improvements include:
-
Waiting until indexing is finished before launching the language servers.
-
Language server requests no longer blocking the editor.
-
Debouncing some requests to minimize heavy processing
-
New request cancellation support to avoid unnecessary processing.
-
Faster validation and lazy loading of quick fixes.
-
Reduced quarkus properties completion payload size.
-
Pre-emptively fetching Quarkus data in the Quarkus project wizard, in order to avoid waiting after clicking on the
Next
button.
These fixes contribute to a smoother coding experience, better overall performance, and, dare I say it, "developer joy".
Language Server client improvements
Language Servers console
Although not directly useful to users in most cases, the new Language Server console view is extremely important when we need to troubleshoot issues with the language servers.
The state of the servers is visible, stop and restart is available with a right-click, and you can enable different levels of tracing:
The communication details between the IDE and the language servers are seen in the "LSP consoles" pane. In verbose
mode, the messages can be expanded for more details:
This feature has proven invaluable in assisting us in diagnosing performance issues with the extension. It will enable users to provide valuable troubleshooting information in case any issues arise.
Application properties support
Qute improvements
We’ve spent significant effort on making the best Qute support around.
New syntax coloration
The Qute parser has been rewritten to allow for proper syntax coloration:
Coloration settings are available at Preferences | Editor | Color Scheme | Qute
.
Completion redux
Editing Qute templates is now better than ever, with new brackets autoclose, improved HTML integration, new completion icons. In particular, the enhanced snippet completion, that behaves like IntelliJ’s live templates, available for different Qute sections:
Section {#}
completion now displays user tags contributed by dependencies, like Renarde or Web Bundler:
Improved {#insert} and {#include} support
The {#insert}
and {#include}
sections can be used to specify the extended template to include in the current template. This release extends the support for these sections with validation, document link, completion, and code lens.
Navigation between templates/code
You can navigate by Ctrl+click
(Cmd+click
on Mac), from one template to another (referenced as user tags, via {#include}
or {#insert}
), or from a template definition from a java file to the actual file:
New template fragment support
Fragment sections define a part of the template that can be treated and rendered as a separate template. Support for fragments includes snippet completion, hover and validation.
In a java class, you can navigate to a referenced #fragment
via code lens and document link
Renarde support
Quarkus Tools now provides support for the Renarde web framework:
-
Public methods of sub-classes of a Renarde
Controller
automatically show a clickable codelens, even though they’re lacking a HTTP method annotation, as they’re treated as valid JAX-RS endpoints: -
Completion on the Renarde
uri
anduriabs
namespaces lists available Renarde controllers: -
Quick-fix is available to add missing input fields to a
{#form}
section:
Type-Safe Message Bundles partial support
We have introduced partial support for Qute type-safe message bundles. If you defined @MessageBundle
classes in your code, you’ll automatically get autocompletion for those messages in your Qute templates, with the messages rendered as inlay hints:
Rendering messages from properties files is not yet supported.
Validation
Java files
Validation has been enhanced with the following features:
-
GraphQL
void
operations are now allowed in Quarkus 3.1 and higher and the correct placement of GraphQL directives is now checked: -
Quarkus
BuildItem
subclasses are checked whether they’refinal
orabstract
:
Severity mappings
We’ve tried to bind some Microprofile and Qute diagnostics reported by the language servers to IntelliJ’s Inspections settings, as it felt more natural than having specialized preference pages. But, since this is a bit of a hack, the inspections settings are mostly ignored, except for a couple severity settings. The limitations are described in each inspection description:
In most cases:
-
Scope: values are ignored
-
Severity: only Error and (Weak) Warning are respected. Other values mean no errors will be reported
-
Highlighting in Editor: values are ignored
Quick-fixes updating settings
We’ve introduced quick fixes that allow you to disable validation for certain errors. Useful, for instance, when you find false-positive errors add too much noise to your development workflow.
Unassigned @ConfigProperty
properties (i.e not declared in application.properties
) in java files, or unknown properties (seemingly unused) declared in application.properties
can now be excluded from validation via a quick-fix, e.g:
You can then update those exclusions in Preferences | Editor | Inspections | MicroProfile | Java files | Unassigned properties
or Preferences | Editor | Inspections | MicroProfile | Properties files | Unassigned properties
Similarly you can exclude a particular Qute template from validation, or its entire module
You can then head over to Preferences | Editor | Inspections | Qute | Templates | Validation
,
Miscellaneous improvements
-
The Quarkus project wizard, on top of being super snappy, now offers easy (de)selection of extensions by double-clicking on them.
-
Projects in WSL2 are now supported.
-
Run configurations have been renamed to
Quarkus Dev Mode
, to minimize confusion with IntelliJ Ultimate’s built-in Quarkus support. -
Vert.x reactive routes, JAX-RS and Renarde endpoints are now shown as implicitly used, as well as Quarkus
@BuildStep
-annotated classes and@Observer
-annotated methods.
Looking forward
Quarkus' "developer joy" mantra obviously applies to your time spent in the IDE and that’s what the Red Hat Developer team is vying for. As we reflect on the past five months of releases, we’re pretty excited about the progress we’ve made on the Quarkus development experience, in IntelliJ IDEA.
And we’re not going to stop here, so stay tuned for more performance improvements and exciting new features in the coming weeks. We’re actually planning to make it easier for you to get those new bits as soon as possible, by publishing updates to the EAP release channel.
Finally, if you haven’t done it already, please add your review to the JetBrains marketplace. Your feedback matters!
In case you find bugs or have ideas for some great new features, don’t hesitate to head over to our Github repository and open a ticket.