What’s New in IntelliJ IDEA 2024.1

IntelliJ IDEA 2024.1 introduces an array of exciting upgrades to help streamline your workflows. IntelliJ IDEA Ultimate now boasts full line code completion, providing comprehensive code-aware suggestions for entire lines of code. Support for Java 22 ensures compatibility with the latest language features. The overhauled terminal enhances command-line operations, while sticky lines in the editor facilitate smoother navigation through codebases. There are dozens of other improvements to various parts of the IDE in version 2024.1. Check them out below!

Key highlights

Full line code completion
Ultimate

IntelliJ IDEA Ultimate 2024.1 comes with full line code completion for Java and Kotlin. This feature is powered by an advanced deep learning model seamlessly integrated into the IDE. It enhances coding efficiency by predicting and suggesting entire lines of code based on contextual analysis. These suggestions are powered by specialized language models that we’ve trained specifically for different languages and frameworks and that run entirely on your local device, ensuring your data remains secure without any need for communication with an external server. This functionality is included in the IntelliJ IDEA Ultimate license subscription. Learn more in this blog post.

Support for Java 22 features

IntelliJ IDEA 2024.1 provides support for the feature set in JDK 22, released in March 2024. This includes support for the final iteration of unnamed variables and patterns, the second preview of string templates and implicitly declared classes, and instance main methods. Additionally, this update introduces support for new statements preceding super(...) in their preview state. Learn more in this blog post.

New terminal
Beta

IntelliJ IDEA 2024.1 unveils an overhauled terminal featuring both visual and functional enhancements to streamline command-line tasks. This update gives the familiar tool a fresh new look, with commands separated into distinct blocks, along with an expanded set of features, such as smooth navigation between blocks, command completion, and easy access to the command history. Learn more in this blog post.

Sticky lines in the editor

We’ve introduced sticky lines in the editor to simplify working with large files and exploring new codebases. This feature keeps key structural elements, like the beginnings of classes or methods, pinned to the top of the editor as you scroll. This way, scopes always remain in view, and you can promptly navigate through the code by clicking on a pinned line.

AI Assistant

Improvements in AI Assistant

Improvements in AI Assistant
Ultimate

AI Assistant has received several valuable updates, including improved test generation and cloud code completion, custom prompts for commit messages, the ability to create files from code snippets, and updated in-editor code generation. Learn more in this blog post.

Please note that in version 2024.1, AI Assistant has been unbundled and is now available as a separate plugin. This change is driven by the need to offer greater flexibility in decision-making regarding the use of AI-powered technologies, providing you with more control over your preferences and requirements in your working environments. AI Assistant still requires an active JetBrains AI subscription.

Improved code highlighting for Java and Kotlin in AI Assistant

Improved code highlighting for Java and Kotlin in AI Assistant
Ultimate

We’ve enhanced code highlighting for Java and Kotlin within AI Assistant’s responses. Code in the AI chat is now highlighted just as it would be in the editor, making it easier to assess quickly. This enhancement is designed to make working with AI Assistant’s suggestions more intuitive by offering an editor-like experience right within the chat.

User experience

IDE features available for Java and Kotlin during indexing

IDE features available for Java and Kotlin during indexing

Basic IDE functionalities like code highlighting and completion now work for Java and Kotlin during project indexing, which should enhance your startup experience. Additionally, you can navigate through the code using Go to class and Go to symbol while the project is still loading.

Updated New Project wizard

Updated New Project wizard

To reduce your cognitive load while configuring new projects, we have made slight adjustments to the layout of the New Project wizard. The language list is now positioned in the upper left-hand corner, enhancing the discoverability of the most popular options.

Option to scale down the entire IDE

Option to scale down the entire IDE

You can now scale the IDE down to 90%, 80%, or 70%, giving you the flexibility to adjust the size of IDE elements both upward and downward.

Java

Language injections in string templates

IntelliJ IDEA 2024.1 introduces the ability to inject languages into string templates. You can do this with annotations, which automatically select the required language, or by using the Inject language or reference intention action (Alt+Enter) to manually select a language from a list. If you use the latter method, the IDE will offer to insert the language annotation for you. After performing the injection, you can call the list of intention actions again and choose to open and edit the injected fragment in a separate editor pane.

Improved workflow for logs

Since logging is an important part of daily development, we’ve introduced a range of updates to enhance IntelliJ IDEA’s user experience for it. You can now easily navigate from log messages in the console to the code that generates them. Additionally, the IDE suggests adding loggers where they're needed and simplifies inserting logger statements, even when the logger instance is not in scope. Learn more in this blog post.

New inspections and quick-fixes

We’ve implemented new inspections and quick-fixes for Java to help keep your code neat and error-free. The IDE now detects bitwise operations that can be replaced with calls to the Long.hashCode() or Double.hashCode() methods for clarity. Additionally, a new quick-fix simplifies switching between implicit and explicit class declarations based on your codebase's requirements. Another new inspection suggests using existing static methods for matching code fragments, making it easy to reuse code without introducing additional APIs. Moreover, the IDE now detects and reports unreachable code that will never be executed.

Enhanced user experience with multi-release JARs

IntelliJ IDEA 2024.1 offers an enhanced user experience with multi-release JAR libraries. When you use a class that has different versions, the Go to declaration feature now selects the proper version from the JAR based on your current module’s language level. Moreover, the Go to class feature offers extra information about the version of the class. When you use Step Into while debugging, the IDE will take you to the class that corresponds to your JDK version, not the language level of your module.

Revamped Conflicts Detected dialog

Revamped Conflicts Detected dialog

In version 2024.1, we've revamped the Conflicts Detected dialog to improve readability. Now the code in the dialog mirrors what’s in the editor, giving you clearer insight into conflicts, and the IDE automatically saves window size adjustments for future use. Plus, we've updated the buttons and their behavior to streamline the refactoring workflow, and the dialog is now fully accessible via the keyboard, meaning that you can use shortcuts and the arrow keys for seamless interaction.

Rename refactoring inlay hint

Rename refactoring inlay hint

To make the renaming process easier and more intuitive, we’ve implemented a new inlay hint that appears on top of the changed code element. To update all references in the code base to the new version, you simply need to click on this hint and confirm the change.

Kotlin

K2 Kotlin mode Alpha

K2 Kotlin mode
Alpha

IntelliJ IDEA 2024.1 introduces the new Kotlin K2 mode, leveraging the embedded K2 Kotlin compiler for enhanced Kotlin code analysis. This update not only guarantees compatibility with upcoming Kotlin features, but also boosts the stability of code analysis, resulting in the enhanced quality and reliability of IDE features, as well as improved overall application performance. Learn more.

Official Kotlin code style propagated in all projects

Official Kotlin code style propagated in all projects

Starting from version 2024.1, the IDE uniformly applies the official Kotlin style guide as the default option for all projects, unless explicitly specified otherwise. If your existing project happens to use an older code style without it being explicitly configured, the IDE will automatically switch to the Kotlin coding conventions code style and provide a notification to alert you of this change. To prevent any undesired formatting alterations, we recommend familiarizing yourself with this code style migration guide.

Static imports preserved on copy-pasting

Static imports preserved on copy-pasting

Version 2024.1 accurately preserves static imports, ensuring they are transferred exactly as they appear in the source code. This is particularly valuable when handling nested objects, enums, and Java static imports.

Scala

Better Scala 3 support

Better Scala 3 support

In the new release, we’ve fixed many issues related to how specific syntax cases in Scala 3 are handled. The improvements include the ability to recognize prohibited mixes of modifiers, calculate indentation depth, cut and paste operations without breaking indentation, and associate end markers with their syntax structures. We also improved the Scala 3 support in the debugger, and autocompletion now accurately handles some corner cases, such as when it is used together with the using and given keywords or with unapply signatures.

Scaladoc enhancements

Scaladoc enhancements

We’ve made a lot of minor improvements and fixes to how classes, traits, and method declarations are highlighted in Scaladoc popups and in the quick documentation popup. Nested generic parameters are now highlighted correctly, and field access modifiers are displayed. Additionally, the code inside Scaladoc blocks with triple braces is now highlighted in the same way that standard Scala code is.

Improved compiler-based highlighting

Improved compiler-based highlighting

Until now, if you switched to another editor while using compiler-based highlighting, the code was automatically recompiled. In version 2024.1, we’ve changed that. Whether the code is recompiled now depends on whether the editor is in focus. This helps the compiler-based highlighting react to external changes to source and .class files more quickly and avoid situations where valid code is red.

Scala build tool improvements

Scala build tool improvements

The IDE now adds a .gitignore file to new SBT projects. We fixed an issue where an exception was thrown when running Scala/JVM applications for the first time with Use sbt for builds, and we ensured that all of a module’s transitive dependencies are inserted as direct dependencies during import.

Play Framework update

Play Framework update

To address the compatibility issue between older Play Framework versions (2.8 and below) and JDK 17, we've introduced a warning that notifies you about using incompatible versions of Play and JDK in the Play wizard.

Other improvements

We've introduced new icons: one for the Scala language in the New Project wizard and another for SBT in View | Tool windows. Additionally, you'll notice subtle enhancements in how inlay hints are presented, with rounded corners and improved alignment. Furthermore, we've added Scala documentation to the Settings | Editor | CodeStyle help page. In worksheets, compilation errors are once again reported correctly in the build window when using Scala 2.13.12, and imports are no longer incorrectly marked as unused before the first code compilation. Moreover, you can now pin down the X-Ray feature, ensuring it remains active even after releasing the Ctrl key.

Version control systems

In-editor code review

In-editor code review

IntelliJ IDEA 2024.1 introduces an enhanced code review experience for both GitHub and GitLab users with the implementation of a new review mode. Integrated within the editor, this feature facilitates direct interaction between authors and reviewers. Upon checking the pull/merge request branch, review mode activates automatically and pink markers appear in the gutter, indicating that code changes are available for review. Clicking on these markers reveals a popup displaying the original code so you can quickly identify what has been changed. Gutter icons help you swiftly initiate new discussions, as well as view and hide existing ones. They also provide easy access to comments, making it easy to review, reply, and react to them. Learn more about this change in our blog post.

Option to display review branch changes in a Log tab

Option to display review branch changes in a Log tab

IntelliJ IDEA 2024.1 streamlines the code review workflow by offering a focused view of branch-related changes. For GitHub, GitLab, and Space, it is now possible to see changes in a certain branch in a separate Log tab within the Git tool window. To do so, click on the branch name in the Pull Requests tool window and pick Show in Git Log from the menu.

Support for reactions on code review comments

Support for reactions on code review comments

IntelliJ IDEA 2024.1 brings support for posting reactions to review comments for GitHub pull requests and GitLab merge requests, with a set of emojis already available to choose from.

Statuses of CI checks in the Git tool window

Statuses of CI checks in the Git tool window

We’ve introduced a new column in the Log tab of the Git tool window, allowing you to easily review the results of GitHub commit checks performed by your CI system.

Create pull/merge requests from push notifications

Create pull/merge requests from push notifications

After successfully pushing your changes to the version control system, the IDE will now alert you with a single notification informing you about the successful push and suggesting an action to create a pull/merge request.

Visual indicators for pending GitHub updates

Visual indicators for pending GitHub updates

We’ve introduced visual indicators to inform you about pending updates within your code review workflow. When there are changes that require your attention, a dot will appear on the tool window icon. Unseen pull requests will also be marked with a blue dot, ensuring you don’t miss updates in your code review process.

Preventing large file commits to repositories

Preventing large file commits to repositories

To help you avoid version control rejections due to oversized files, the IDE now includes a pre-commit check that prevents you from committing such files and notifies you of the restriction.

Allow unrelated histories merge option

Allow unrelated histories merge option

The Merge into dialog now has an Allow unrelated histories option in the drop-down menu. When selected, it allows two branches to be merged even if they have no common history.

Branch filter for the History tab in the Git tool window

Branch filter for the History tab in the Git tool window

In the Git tool window, the Show all branches button has been replaced with a branch filter, allowing you to review changes made to a file within a designated branch. We’ve also adjusted the orientation of the toolbar, positioning it horizontally for improved usability.

Stash tab in the Commit tool window

Stash tab in the Commit tool window

For users who rely on stashes to store temporary uncommitted changes, we’ve introduced a dedicated tab within the Commit tool window for convenient access. If you use both stashes and shelves, you have the option to enable a combined Stashes and Shelves tab via a corresponding checkbox in Settings/Preferences | Version Control | Git.

Option to exclude folders and files from comparison

Option to exclude folders and files from comparison

In the diff viewer, you can now specify folders and files to be ignored during the comparison process in order to focus solely on relevant changes. Just right-click on any file or folder you don’t want to appear in the comparison results and select Exclude from results from the context menu.

Improved search in the Branches popup

Improved search in the Branches popup

In the Branches popup, you can now filter search results by actions and repositories for quicker and more precise navigation within your version control system.

Git tab removed from the Search Everywhere dialog

Git tab removed from the Search Everywhere dialog

After analyzing the usage statistics, we’ve removed the Git tab from the Search Everywhere dialog by default. If you want to bring it back, you can do so via the Show Git tab in Search Everywhere checkbox in Settings / Preferences | Advanced Settings | Version Control. Git.

Build tools

Opening-speed boost for Maven projects

IntelliJ IDEA now constructs the project model by parsing the pom.xml files. This makes it possible to get a working project structure in seconds while the complete project model with all the dependencies is built in the background, allowing you to dive into the project without waiting for the full sync to finish.

Support for the Maven Shade Plugin’s renaming workflow

With the release of IntelliJ IDEA 2024.1, we're adding the long-awaited support for the Maven Shade Plugin’s renaming functionality. Now, IntelliJ IDEA is aware of the renaming workflow, providing accurate code highlighting and navigation when working with your shaded JAR and its dependencies.

Direct access to source files from the quick documentation popup

Direct access to source files from the quick documentation popup

The quick documentation popup now provides an easy way to download source code. Now, when you're viewing documentation for a library or dependency and need to access its source code, you can simply press F1. The updated popup will provide a direct link you can use to download the required source files, streamlining your workflow.

Maven repositories in the Maven tool window

Maven repositories in the Maven tool window

The list of Maven repositories, along with their indexing statuses, is now displayed in the Maven tool window, instead of its previous location in the Maven settings.

Gradle version support update

Starting from this version, IntelliJ IDEA no longer supports projects using Gradle versions older than 4.5, and the IDE will not perform Gradle sync for projects with unsupported Gradle versions.

Run/Debug

Inline breakpoints for multiple statements

Inline breakpoints for multiple statements

IntelliJ IDEA 2024.1 offers a more convenient workflow for setting breakpoints in lines containing lambda functions or return statements. Once you set a breakpoint by clicking on the gutter, the IDE automatically displays inline markers where additional breakpoints can be set. Each breakpoint can be configured independently, unlocking advanced debugging capabilities.

Folded library calls in the call stack

Library calls are now folded by default in the Debug tool window’s call stack, helping you maintain your focus when browsing your code. However, if you need to verify a library call sequence, you can expand the group and explore the frames accordingly. To reveal the list, use the Filter icon in the toolbar or call the context menu and disable the Hide Frames from Libraries option.

Conditional statement coverage

Conditional statement coverage

Version 2024.1 brings IntelliJ IDEA one step closer to achieving comprehensive test coverage. This update focuses on identifying which conditional statements in the code are not fully covered by tests. Now IntelliJ IDEA both shows which line has an uncovered condition and specifies any conditional branches or variable values that are not covered. This feature is enabled by default, and you can control it in Settings/Preferences | Build, Execution, Deployment | Coverage.

Code coverage settings moved to the main IDE settings

Code coverage settings moved to the main IDE settings

Code coverage settings have been moved from the Run Configuration popup to Settings/Preferences | Build, Execution, Deployment | Coverage. This shift eliminates the need to individually update the configuration for each test run to select a coverage runner or enable advanced features, like tracking which tests cover a specific line of code.

Simplified importing for JaCoCo test coverage reports

It’s now easier to import, browse, and analyze code coverage data that the JaCoCo runner gathers in your CI/CD pipeline. A direct link for importing JaCoCo reports now appears in the Coverage tool window if no reports are displayed there. We’ve also updated the window’s toolbar with an import icon that allows you to retrieve the JaCoCo report as an .exec file.

Frameworks and technologies

Improved bean completion and autowiring for Spring

Improved bean completion and autowiring for Spring
Ultimate

IntelliJ IDEA Ultimate now offers autocompletion for all beans from the application context and automatically autowires them. If a bean autowires dependencies via the constructor, the related field is automatically wired through the constructor as well. Likewise, if dependencies are injected via fields or via Lombok’s @RequiredArgsConstructor annotation, the new bean is wired through the field automatically.

Enhanced Spring diagrams
Ultimate

We’ve made accessing Spring model diagrams easier. You can call them using bean line markers or by using an intention action (Alt+Enter) on Spring classes. We’ve introduced new icons for Spring diagrams, enhancing the visualization of Spring stereotypes like components, controllers, repositories, and configuration beans. Additionally, you can now conveniently toggle the visibility of beans from libraries, which are hidden by default.

HTTP Client improvements
Ultimate

The HTTP Client in version 2024.1 offers more authentication options, including the PKCE Authorization Code and Device Grant flows. It also supports extra parameters for token and authentication requests, in addition to automatically handling code_challenge generation and code_verifier passing for token retrieval during PKCE requests. The HTTP Client’s upgrade to Netty as its low-level networking library enables SSL, proxies, and HTTP/2 support, facilitating the implementation of HTTP/2. Additionally, the HTTP Client’s toolbar has been revamped to align with the style of the new UI, providing a more polished and cohesive appearance.

Endpoints tab in Search Everywhere

Endpoints tab in Search Everywhere
Ultimate

We’ve enhanced the Search Everywhere dialog by introducing an Endpoints tab, which appears in projects where URL search results are pertinent. Currently, the IDE automatically includes this tab when it detects the presence of Spring, Micronaut, Ktor, or Quarkus technologies in your project.

Code completion for HTTP headers

Code completion for HTTP headers
Ultimate

HTTP headers are now easily completed in all common scenarios, such as with Spring WebClient and REST Assured tests. When an expected value is encountered, a completion popup appears automatically.

Optimized JSON schema processing

Optimized JSON schema processing
Ultimate

We’ve optimized the code behind JSON schema validation and completion. As a result, the IDE now handles these tasks faster and with reduced memory consumption. In real-life files with Azure Pipelines, schema inspections are now 10x as fast.

Quarkus updates
Ultimate

We’ve introduced a new settings editor for Quarkus run configurations. Now the Run/Debug Configuration dialog offers an improved UI for both Maven and Gradle projects, with easy access to popular settings like Run profile and Environment variables. For your convenience, the Quarkus Dev UI is easily accessible via a new icon added to the Run tool window’s toolbar.

Support for OpenRewrite
Ultimate

IntelliJ IDEA Ultimate 2024.1 integrates OpenRewrite, expanding the IDE’s existing refactoring capabilities and providing you with a toolkit for improving code quality, consistency, and maintainability. Using OpenRewrite’s recipes, you can modernize legacy code, optimize performance, and handle complex migration tasks such as upgrading to a new Spring Boot version.

WireMock server support
Ultimate

We’ve implemented WireMock support via a plugin that you can install from inside the IDE or get from JetBrains Marketplace. This integration includes schema completion for JSON configurations, the ability to generate WireMock stub files from the Endpoints tool window, and a built-in run configuration that allows you to spin up your servers directly from the editor. This addition lets you swiftly create test data servers or stubs, simplifying the development of web UIs and microservices.

Enhanced Terraform support
Ultimate

IntelliJ IDEA Ultimate 2024.1 brings improved Terraform support that simplifies the process of creating, managing, and scaling your infrastructure. The IDE now streamlines initialization via an explicit suggestion to run terraform init, and offers extended code completion capabilities for more than 3,900 third-party Terraform providers. Additionally, the IDE introduces support for Terraform's template language (tftpl), enabling dynamic templating with the option to seamlessly integrate it with your preferred programming language. You can find more details in our blog post.

Database tools

Local filtering in the data editor

Local filtering in the data editor
Ultimate

This release introduces the long-awaited local filtering feature in the data editor. You can now swiftly filter rows by column values without sending queries to the database. This local approach only impacts the current page, though you can adjust the page size or fetch all the data if you need to extend the scope. To disable all local filters, deselect the designated Enable Local Filter icon.

Simplification of sessions

Simplification of sessions
Ultimate

IntelliJ IDEA Ultimate 2024.1 streamlines query execution by eliminating the need to manually select sessions. Instead, to attach a file, you simply need to choose the data source, rather than the session. Additionally, launching functions no longer requires selecting a session; you can now opt to run functions directly from the console or file. These changes aim to minimize the learning curve with the tool, reducing unnecessary steps and enhancing overall usability.

Web development

Quick documentation improvements

Quick documentation improvements
Ultimate

We have significantly enhanced the quick documentation popup. It now supports syntax highlighting for code blocks. In TypeScript, it now shows interface members, enum constants, and type alias bodies. You can use the Show more link to expand the full list of type members and navigate to the referenced types. Additionally, it’s now possible to navigate between multiple declarations of interfaces, type aliases, enums, functions, and other entities using the paging control at the top of the dialog.

Quick-fixes for React props and state creation

Quick-fixes for React props and state creation
Ultimate

IntelliJ IDEA Ultimate 2024.1 introduces several new quick-fixes for React that let you create props and states on the fly. You can apply these quick-fixes using the shortcut Alt+Enter.

Language Services widget

Language Services widget
Ultimate

You’ll find the new Language Services widget on the status bar, providing insights into the active language services for the current file and project. You can restart services or navigate to their settings directly from this widget.