JetBrains DataSpell 2021.2 Help

Configuring code style

If certain coding guidelines exist in a company, one has to follow these guidelines when creating source code. JetBrains DataSpell helps you maintain the required code style.

Code styles are defined at the project level and at the IDE level (global).

  • At the project level, settings are grouped under the Project scheme, which is predefined and is marked in bold. The Project style scheme is applied to the current project only.

    You can copy the Project scheme to the IDE level, using the Copy to IDE command.

  • At the IDE level, settings are grouped under the predefined Default scheme (marked in bold), and any other scheme created by the user by the Duplicate command (marked as plain text). Global settings are used when the user doesn't want to keep code style settings with the project and share them.

    You can copy the IDE scheme to the current project, using the Copy to Project command.

Configure code style for a language

  1. Press Ctrl+Alt+S to open the IDE settings and select Editor | Code Style.

  2. Select the language-specific settings page.

  3. Choose the code style Scheme to be used as a base for your custom code style for the selected language.

    Select a scheme for the code style settings
  4. Browse through the tabs of the selected language page, and configure code style preferences for it.

    Code style settings for Markdown

Copy code style settings from other languages

For most of the supported languages, you can copy code style settings from other languages or frameworks.

  1. Press Ctrl+Alt+S to open the IDE settings and select Editor | Code Style.

  2. Select the language-specific settings page.

  3. From the list that appears, select the language to copy the code style from.

Last modified: 08 November 2021