Template formatter

A little premature and just shows how easily distracted I get … A thread on Twitter sent me down the long and windy road of writing a Go template formatter (with VS code extension) (for HTML templates only, for now) …

Still a little unfinished and not something you should/could install … yet.


This looks super useful, Bep!!

1 Like

Yep, usefull!

Yes please, been needing a formatter in vscode that works with Hugo templates!

Just a quick note that I think it’s going to be “not too long” before I post this to the public (mid next week?). I’m using it myself now, and it’s mostly working great (and I have been using it on some fairly complex/big templates). Thought I would take it to a place where I’m happy with the output before I push it to the world and start to get complains about “what? spaces and not tabs?”.

Oh, and looking at the before/after in these template formattings, I ask myself who I could do without this for so long …