Indenting HTML is awful

When I first started writing code it was in Notepad on Windows. I've still not forgiven Microsoft.

Now with better editing environments things are easier, but I’ve once again found myself frustrated by pages of deeply nested HTML and the unmatched tags that present when editing without proper structural support.

In lieu of structural editing and wanting to avoid introducing indirection through partials, templates, or additional functions, we can make things slightly better by highlighting indentation and folding based on the aforementioned whitespace.

Enabling indent guides in web-mode is as simple as adding a hook in Doom.

(after! web-mode
  (add-hook! 'web-mode-hook #'highlight-indent-guides-mode))

Of course, it is possible to generate HTML from Lisp, but not everyone’s onboard with square brackets or parentheses in the ‘wrong’ place.

[:html {:lang "en-GB"}
 [:head
  [:title "Vectors and keywords"]]
 [:body
  [:h1 "Can it be that it was all so simple then?"]]]