JetBrains Fleet 1.48 Help

Format code

This topic explains how to use and configure the code formatting features in JetBrains Fleet.

File format/language

While working on a file, JetBrains Fleet automatically detects its format, which determines the behavior of code intelligence features.

File format menu in the bottom-left corner of the editor

If the detected format is incorrect, you can manually specify the file format.

Set file format

  • In the bottom-left corner of the screen, click the file format menu and select a language from the list.

    File format menu suggesting available languages

Indent on line break

When you press Enter, JetBrains Fleet starts the new line with the correct indentation. This feature is enabled by default.

Disable auto-indenter

  1. In the Preferences menu, clear the Editor: Code | Auto indent on Enter checkbox.

  2. Alternatively, add the following line to your settings.json file:

    "enableIndenter": false

Reformat file

To format the current file, press ⌥ ⇧ F. You can also find this action using the Actions popup ⌘ ⇧ K.

Searching for Reformat Code action using the Go to popup

Formatting rules

JetBrains Fleet determines formatting rules based on EditorConfig and IntelliJ configuration files present in the workspace.

EditorConfig

JetBrains Fleet allows you to manage all code style settings for each individual set of files with EditorConfig support.

EditorConfig is a widely adopted standard for defining code formatting rules. It helps synchronize formatting settings across teams and environments.

In addition to standard properties, JetBrains Fleet also supports IntelliJ-specific keys. Some of these keys require Smart Mode to be enabled.

Apply EditorConfig

  • To apply formatting rules to a specific folder, place a .editorconfig file in that folder. Rules are applied top-down, and subfolder rules override parent rules.

  • To define global rules, place a .editorconfig file in the root directory that contains all your projects. These rules will apply to all projects within that directory.

08 May 2025