go-lang-plugin-org / go-lang-idea-plugin

Google Go language IDE built using the IntelliJ Platform
https://plugins.jetbrains.com/plugin/5047
Other
4.56k stars 570 forks source link

Support text / html templates #351

Open dlsniper opened 10 years ago

dlsniper commented 10 years ago

Golang offers templates in form of html and text.

It would be nice to investigate the capabilities of the templating system and see how we can add some support for it. I'm thinking of highlighting, goto provider, validation (?), check if any variable is missing at render time and so on.

I would keep this open here to list the features and keep track of them and then step by step add those features to the plugin.

Documentation reference:

Thanks.

EtienneBruines commented 9 years ago

Would like to +1 this. (hope you don't mind.)

SchumacherFM commented 9 years ago

:+1: At the moment I'm using .hbs file extension which are Mustache/Handlebars templates for the JS world but the syntax is different ...

ghost commented 8 years ago

+1

sintanial commented 8 years ago

+1

menklab commented 8 years ago

+1

erdem-aslan commented 8 years ago

Please Stop +1'ing Anything

Read the landing page, quote;

'Annoying as it might be, please don't comment with "bump", "+1", "same for me" or other irrelevant comments as they're useless for identifying the issue and finding the solution.

Contributions are always welcome and we'll do our best to make the most of them.'

dlsniper commented 8 years ago

Unfortunately it's @github which doesn't offer any other way to vote for issues and I guess people still don't read README files :D It's unfortunate and I guess the only way to solve this would be to ping Github support for this feature.

EtienneBruines commented 7 years ago

Is there a current workaround? The part where I don't have auto-completion, I can work with. But I'd love for the HTML not to render invalid every time.

Just having Gogland recognize everything between {{ }} as "unknown language" would suffice.

(Any extension / plugin is fine. I've tried Handlebars, but it doesn't let me disable the handlebars-inspections, so instead of whining about HTML tags, it whines about Handlebar syntax.)

ianbrandt commented 7 years ago

@EtienneBruines I'm using formatter markers to suppress line wraps for template actions in Hugo HTML templates:

    <!-- @formatter:off -->
    {{ partial "big-partial-name" (dict "with" "lots" "of" "entries" "and" "such") }}
    <!-- @formatter:on -->

Unfortunately, I have to turn off "Wrap on typing" for it to really work: https://youtrack.jetbrains.com/issue/IDEA-180860.

dlsniper commented 7 years ago

Hi all, as an FYI, it's unlikely someone will implement this in this plugin, as you may have noticed this plugin hasn't been updated in more than a year now. You can follow the issue here: https://youtrack.jetbrains.com/issue/GO-2953 which is created for Gogland / IntelliJ Ultimate plugin and stands a better chance of being implemented at some point. Hope it helps.