Go Template

Compatible with IntelliJ IDEA (Ultimate, Community), Android Studio and 10 more

Included In

What’s New

Unfortunately, JetBrains s.r.o. didn’t leave any update notes.
Feb 06, 2025
Version 251.20015.29

Rating & Reviews

4.2
8 Ratings (2,419,073 Downloads)
5
4
3
2
1

Richard Brus

12.12.2023

It's working great for me. Use it to deal with Hugo Go code inside of HTML templates. Definitely helps a lot - thanks!

0

Lucas Rodrigues

13.04.2022

One issue is the conflict between tabs. I'm using Templates for code generation, for Go and other languages. It's possible to bind other format, but the alignment of the items conflicts. I think it should have a option to either priority the padding/tabs from the selected language or the Template.

0

Brian Topping

12.09.2019

This plugin would be about 5x better for new users with some instructions of what's possible. Here, let me help.

  • Create an extension for your templates. If they are HTML, *.gohtml is already defined for you.
  • Settings | Editor | File Types has the place to add your template type. The hidden gem: once started, there is a popup for the type of the underlying template. So I created *.goyaml and then told it these underlying type of the file was YAML. Voila, language sensitive rendering.
  • Learn how to use gotype annotations on your templates: https://blog.jetbrains.com/go/2018/12/14/go-templates-made-easy/. Of course that's a Jetbrains blog, so it doesn't actually tell you what those annotations are. They basically are the cue for the editor to tell what kind of object is at the root of the instance hierarchy provided at the template.Template.Execute call. Voila, template source objects are context-aware.

Now you can actually get some work done. w00t w00t!

+7

Additional Information

Vendor:
Plugin ID:
org.jetbrains.plugins.go-template