This topic covers how to use and set up the code formatting features in JetBrains Fleet.
When you are working on a file, JetBrains Fleet automatically detects its format, which determines the behavior of the code intelligence features.
If the detected format is not what you want, you can specify file format manually.
Set file format
In the bottom-left corner of the screen, click the file format menu, then select a language.
Indent on line break
Whenever you put a line break, JetBrains Fleet starts the new line with the correct indentation. This feature is enabled by default.
In the Preferences menu, uncheck .
Alternatively, add the following line to your settings.json file:
Whenever you want JetBrains Fleet to format the current file, use the ⌥ ⇧ F shortcut. Also, you can find this action in the Actions popup ⌘ ⇧ K:
JetBrains Fleet determines the formatting rules based on the EditorConfig and IntelliJ configuration files present in the workspace.
JetBrains Fleet allows you to manage all code style settings for each individual set of files with EditorConfig support.
EditorConfig is a widely-recognized standard for describing the code formatting rules. It allows for easy syncing of the code formatting settings between team members and IDEs.
Along with standard EditorConfig properties, JetBrains Fleet works with those specific to IntelliJ-based IDEs. Some of IntelliJ keys require Smart mode.
To apply formatting rules to a particular folder, place the .editorconfig file in it. Rules are resolved top-down, which means that rules for a subfolder will override the settings that apply for its parent folder.
To create global rules, place the .editorconfig file in the root folder where all your projects reside. This will apply the formatting for all the projects within the folder.