The Tree Editor preferences panel is opened from menu Options → Preferences+Tree Editor
Figure 22.75. The Tree Editor preferences panel
Check if the document should be formatted and indented (pretty-print) on save.