Skip to content

Autoformatter Set Up

Renato Dell'Osso edited this page Dec 5, 2023 · 5 revisions

If you fork from the Common Library, the autoformatter should be set up for you.

Our autoformatter autoformats your code to meet our code standards. To set it up:

First, copy this URL. It's a link to our config file.

Next, open settings in VS Code by either clicking the Gear Icon in the bottom left, then clicking Settings, or by performing the keybind [Ctrl] + ,

Finally, set the following settings:

  • Editor: Default Formatter - Language Support for Java(TM) by Red Hat
  • Editor: Format On Paste - Checked [✓]
  • Editor: Format On Save - Checked [✓]
  • Editor: Sticky Tab Stops - Checked [✓]
  • Editor: Insert Spaces - Unchecked [X]
  • Java > Format > Settings > Profile - 4026Style
  • Java > Format > Settings > Url - (The URL you copied in Step 1)

You're done! Just go back to a file and hit Ctrl + S or Ctrl + Shift + I to format your code.

Clone this wiki locally