Inconsistent indentation in html/template files


I prefer 2 space indentation for html files. When indentation is set to 4 spaces (configured by clicking on '4 spaces' > 'Configure Indents for Go Template'), auto-indentation looks as expected:


However, when I use the same dialog to configure 2 space indentation, the indentation of html tags looks fine but template directives are still being indented /w 4 spaces:

How do I get the template directives indented correctly?

1 comment

You cannot do this. On both screenshots you configure indentation for "Other file types", not for HTML or Go Template.

Go Template language doesn't have its own indentation settings ( But even if it had, still it would apply to all lines in Go Template file, no matter what elements are located on them.


Please sign in to leave a comment.