Inconsistent indentation in html/template files

Hello,

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
Comment actions Permalink

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 (https://youtrack.jetbrains.com/issue/GO-8328). But even if it had, still it would apply to all lines in Go Template file, no matter what elements are located on them.

0

Please sign in to leave a comment.