Fellow vim users: how are you setting up your vim language for editing Hugo HTML templates? Do you use vim-go or something else? Is there a syntax-highlighting plugin I’m not aware of? I was surprised that syntax highlighting in vim only barely works because Hugo seems like it appeals to a sort of vim / command-line power user, and I know the project has been around for a few years. Maybe the nested syntax is just too gnarly to easily highlight?
There is one vim plugin (vim-hugo-helper) listed on the Hugo editor plugins page which doesn’t do syntax highlighting, and Google hasn’t suggested that other better plugins exist. I know that Hugo uses Go’s
html/template, and the vim-go plugin technically does syntax highlighting, but not really — for some reason, only attribute strings are highlighted (i.e. not tags, elements, comments, etc.)
Here’s how mine looks:
Is anyone interested in pairing on a PR for vim-go to supercharge the syntax highlighting?