Jetbrains IDEs are a huge monster with everything you need. But sometimes it becomes difficult to do small things, like in this case, recognise HTML files as GO templates. From here you have two options…
File specific configuration
If you have one or few-specific files, you can just turn the syntax highlighting only to those files without affecting the global configuration.
You have to do right-click on the desired file, and then use the option Override File Type
After you click on the Override option, a dialogue will pop out.
Scroll down until you find the type you desire, for this explanation will pick Go Template
As you can imagine, you should do this operation on every file, and if by file basis is not good to you, keep reading.
Global configuration
To modify global configuration for the Hugo’s Html GOTemplates you have to go to menu File
-> Settings...
Then you have to click in +
button and add *.html
, and leave blank the second field, press ok
, you may be asked if you want to override the association, override it.
Now you should find visual change on icons and, of course, syntax-highlighting.
Thanks for reading!
Namaste.