Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] Beautify for hugo template syntax. #9

Open
dtvn opened this issue Aug 23, 2019 · 1 comment
Open

[Request] Beautify for hugo template syntax. #9

dtvn opened this issue Aug 23, 2019 · 1 comment

Comments

@dtvn
Copy link

dtvn commented Aug 23, 2019

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?

@brennanangel
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants