Kotlin logo

Kotlin

A concise multiplatform language developed by JetBrains

Ecosystem

Kotlin Support in Fleet: Explore a New IDE from JetBrains

Read this post in other languages:

JetBrains Fleet is a lightweight code editor and IDE that uses the IntelliJ code-processing engine. The product is now in public preview, so everyone can try it.

Currently, Fleet allows you to develop in Python, TypeScript / JavaScript, Go, Java, PHP, C#, and other popular languages such as Kotlin. Kotlin support is one of the most advanced, since Fleet is developed mostly in Kotlin and the JetBrains team also uses Fleet to develop Fleet. You can refer to the complete Fleet feature matrix that describes which languages and technologies the product already supports and which are still in the works. With plugins to come soon, more languages and technologies will be supported in the near future in Fleet.

In this blog post, we’d like to tell you more about the current state of Kotlin support in the Fleet Public Preview, including an overview of the different capabilities of the IDE for Kotlin projects.

Explore more

Why Fleet?

Fleet has been built from the ground up based on our many years of experience in IDE development. It combines the simplicity and speed of a lightweight text editor with the transformative power of an intelligent development environment.

Fleet is not designed to replace or replicate JetBrains’ existing IDEs. The main idea behind Fleet is to give developers a new experience with a smart, polyglot tool and workflows such as distributed and collaborative development and the use of generative AI for coding. JetBrains is working on Fleet while continuing to develop its existing IDEs.

Available features for Kotlin in Fleet Smart Mode

Kotlin is supported out of the box in Fleet, making working with the language not only productive and simple, but also enjoyable. It provides a streamlined experience for Kotlin developers. When you want to quickly dive into your project, analyze its structure, and make targeted edits in no time, you can use Fleet as an editor. But when need arises for more robust functionalities, it can transform into a full-fledged IDE.

If you want to enable code intelligence features in Kotlin, you should turn on Smart Mode. These additional features help you avoid mistakes while writing your code faster and more productively.

Enabling Smart Mode in Fleet

Once Smart Mode is enabled, you get access to the code editing features that IntelliJ IDEA users know and love, including:

  • Code completion
  • Code actions
  • Type and parameter information
  • Live templates
  • Code generation

Let’s take a closer look at these features and how they can streamline your coding routine.

Code completion

While you are typing, Fleet provides suggestions for completing your code based on various factors like available code intelligence services, the project structure, surrounding code, and symbol visibility.

The completion suggestions appear either automatically or when you manually activate them by pressing Ctrl+Space.

Code completion for Kotlin in JetBrains Fleet

Code actions

Thanks to continuous code quality analysis, you can make informed decisions and enhance the efficiency of your coding process. Fleet suggests actions tailored to the specific context you’re working in. These suggestions encompass actions ranging from correcting errors to refactoring the code at the caret.

Code actions for Kotlin in Fleet

You can check which actions are available at the caret by pressing Opt+Enter (on macOS) or Alt+Enter (on Windows and Linux).

Once you have decided which action to use, you can either apply it right away or preview the result with a shortcut: Cmd+P on macOS, Ctrl+P on Windows and Linux.

Code actions for Kotlin in Fleet

Type info

If you are not sure what type you are currently dealing with, you can easily find out by pressing Cmd+Shift+T (on macOS) or Ctrl+Shift+T (on Windows and Linux). 

This will prompt Fleet to show you the details about the static type of the symbol or expression.

Type info for Kotlin in JetBrains Fleet

Parameter info

Are you using a method that has numerous overloads, or do you need to quickly find the necessary parameters? Navigate through the available options simply by pressing Cmd+I (on macOS) or Ctrl+I (on Windows and Linux).

Parameter info for Kotlin in JetBrains Fleet

Live templates

Fleet provides a set of Kotlin live templates you can use to insert common constructs into your code, such as loops, conditions, declarations, or print statements. Unlike IntelliJ IDEA, Fleet doesn’t allow you to create new templates. However, you can use the many pre-made templates with your Kotlin code. Check out the complete list of live templates in the Fleet documentation.

Live templates for Kotlin in Fleet

Code generation

When you start typing a particular method or statement, Fleet suggests possible completion options based on the context and existing code. Simply select a suggestion to instantly generate the required code. You can take advantage of code completion to override superclass members like equals(), hashcode(), and other methods.

Code generation for Kotlin in Fleet

By using code generation, you can save time and make sure that your code follows the correct syntax and structure, as Fleet helps you generate the necessary code snippets.

Give Fleet a try and share your experience

Fleet is a polyglot code editor and IDE that supports Kotlin among many other languages. You can think of Fleet as a multipurpose tool and expect dedicated support for specific types of projects to come later.

If you are curious and see a use for a good new tool in your arsenal, we invite you to try Fleet for yourself and explore its capabilities!

The easiest way to download and get started with Fleet is by using the free JetBrains Toolbox App.

Try Fleet Preview

You can also watch this short Fleet overview video, which will help you get started, as well as turn to the documentation for further guidance.

Fleet is still in the Preview stage and is being actively developed. Your feedback and thoughts on the product will help the JetBrains team stabilize and improve it. If you encounter any issues, please submit reports to this issue tracker. You can also get in touch with us at fleet-support@jetbrains.com or @jetbrains_fleet.

Stay tuned for upcoming announcements!

What else to read and watch:

Getting started with Kotlin

JetBrains Fleet — Public Preview Launch Demo [Video]

Fleet 1.19, AI-powered Features and Easier Configuration for rust-analyzer, Python Interpreters, and npm

image description