diff --git a/docs/Formatting.md b/docs/Formatting.md index 9eadabc2..90368ba9 100644 --- a/docs/Formatting.md +++ b/docs/Formatting.md @@ -1,5 +1,16 @@ ## Formatting +### Indentation + +The standard `editor.insertSpaces` & `editor.tabSize` [format settings](https://code.visualstudio.com/docs/editor/codebasics#_indentation) are used for configuring spaces/tabs and their size. To indent XML differently, using language specific settings, add this to your `settings.json`: + +```json +"[xml]": { + "editor.defaultFormatter": "redhat.vscode-xml", + "editor.tabSize": 2 +}, +``` + ### Formatting strategy As the frequency of issues regarding the previous XML formatter increased, we have decided to redo our formatter from scratch. To revert to the old formatter, the setting `xml.format.legacy` should be set to true. @@ -646,4 +657,4 @@ After formatting, you should see that the content of `description` has spaces pr The collapse option will now respect XSD's `nillable="false"` definitions. The collapse on the element will not be done if the element has `nillable="false"` in the XSD and `xsi:nil="true"` in the XML. -**Not supported by the legacy formatter.** \ No newline at end of file +**Not supported by the legacy formatter.**