Skip to content

Commit

Permalink
Clarify source of indentation in docs
Browse files Browse the repository at this point in the history
- Fixes #902

Signed-off-by: Michael Vorburger ⛑️ <mike@vorburger.ch>
  • Loading branch information
vorburger authored and rgrunber committed Nov 14, 2023
1 parent b719b17 commit 311ae95
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion docs/Formatting.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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.**
**Not supported by the legacy formatter.**

0 comments on commit 311ae95

Please sign in to comment.