What I think was a mistake in the past was using 2 or 4 spaces (or tabs) for semantic indentation. I think it should be 1 space, like Comma-Separated Trees has above, and have the editor indicate the indentation level. In my experience this eliminates a common source of tool-caused indentation bugs.