Skip to content

Formatting Preferences

Andrew Lygin edited this page Sep 10, 2019 · 3 revisions

By default, the extension is configured to help you with formatting the code while you're typing. If you want to change any aspect of this behavior, you can do it by editing the tlaplus language settings. To do that:

  1. Open the Command Palette and execute the command Preferences: Configure Language Specific Settings...TLA+.
  2. Set any of the properties listed below to your liking.

Properties, related to formatting:

  • editor.tabSize — the number of spaces a tab is equal to (default 4).
  • editor.insertSpaces — insert spaces when pressing Tab (default true).
  • editor.formatOnType — whether to format code when typing (default true).
  • editor.detectIndentation — whether to automatically detect the editor.tabSize and editor.insertSpaces values when a file is opened (default false).

For example, to switch off the automatic formatting and use 2 spaces for indentation, you can change the settings to:

"[tlaplus]": {
    "editor.tabSize": 2,
    "editor.formatOnType": false
}
Clone this wiki locally