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.

If the detected format is incorrect, you can manually specify the file format.
Set file format
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
In the Preferences menu, clear the checkbox.
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.

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.