Skip to content

Commit 311ae95

Browse files
vorburgerrgrunber
authored andcommitted
Clarify source of indentation in docs
- Fixes #902 Signed-off-by: Michael Vorburger ⛑️ <[email protected]>
1 parent b719b17 commit 311ae95

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

docs/Formatting.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
## Formatting
22

3+
### Indentation
4+
5+
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`:
6+
7+
```json
8+
"[xml]": {
9+
"editor.defaultFormatter": "redhat.vscode-xml",
10+
"editor.tabSize": 2
11+
},
12+
```
13+
314
### Formatting strategy
415

516
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
646657

647658
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.
648659

649-
**Not supported by the legacy formatter.**
660+
**Not supported by the legacy formatter.**

0 commit comments

Comments
 (0)