language-hugo-vscode
language-hugo-vscode copied to clipboard
[Request] Beautify for hugo template syntax.
VSCode might appreciate a Hugo (Go HTML template) syntax beautifier. Still now, Hugo tags are treated as text nodes (pure text) in HTML format leads to its content always get indent backward. Something look like this:
Expectation:
{{ if "what-ever-cond-is" }}
// A text node
{{ end }}
Reality:
{{ if "what-ever-cond-is" }}
// A text node
{{ end }}
Since we already have syntax highlighting for Hugo, maybe it is possible to do a beautifier for it?
We've been using this Prettier plugin for the last few years with Hugo. It's not perfect but it'll get you 85% of the way there: https://github.com/NiklasPor/prettier-plugin-go-template