Tuesday, April 12, 2022

[SOLVED] How to set tab size in Red Hat VS Code XML formatter

Issue

I'm using Red Hat Extension for VS Code to format XML. It formats with 4 spaces per indent.

<element>
    <subelement/>
</element>

How do I configure it to use 2 spaces?


Solution

I had Tab Size set to 2.

Turning off Detect Indentation changed the formatted XML to 2 spaces per indent.



Answered By - Matt
Answer Checked By - Katrina (WPSolving Volunteer)