GoLand has syntax support on Go html files with the file extension of .gohtml
So what about Go text files? Does GoLand support that as well? .tmpl
is supported by vim-go but not GoLand.
As mkopriva has already hinted and you have described as well in the comments, you can go to Preferences/Editor/File Types
and add your custom ending as Registered pattern
to the Go Template. But imo the real game changer is that you can also set Go as Template data language
there. This way even the Go syntax gets validated, not just the template syntax. It's still wonky, but definitly better than nothing.
Still, autoformatting does not work properly and can screw up your code. Therefore, you might also want to make sure the Reformat code
in the commit dialog is unchecked. Same with Optimize Imports
... better keep it unchecked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With