Why there are no good formatters for freemarker co...
# advancedpdf
m
Why there are no good formatters for freemarker code? All of what I can find is not formatting it well.
d
There is a good freemarker extension in VS Code that works if you save them as .ftl files
m
@Derek Jackson Could you please share the name or a screenshot of the logo?
Oh, are you talking about this highlighter?
d
this one, actually:
m
Thanks, will try it.
Broken, as other formatters.
j
i'm using the one from your screenshot there,
dcortes92.FreeMarker
you do have to use the .ftl file extension for it to recognise the file as freemarker but it works well enough for me (still not perfect but better than your typical xml highlighting)
m
I can't deal with this formatting. I currently do it manually, and it takes a lot of time.
j
ah i misunderstood, looking for code formatting not highlighting. i haven't tried the other extension there but am not aware of any other tools for it. i also do it manually if needed
d
this one might work a little better for you. it's not perfect by any stretch, but it is better than doing all your formatting by hand:
m
Not sure if I used it before or not... will check it out. Thanks!
k
I've used a few of them and always end up doing it manually. Most cannot handle the
<#if>
and list syntaxes, especially when nested
😞 1
e
Late to the party, but IntelliJ handles Freemarker.
k
Does it do formatting?
e
Yeah, it formats files, points out errors, code completion, etc
k
Oh wait, is that the webstorm one or the vscode one?
ah webstorm
I thought you meant the vscode one and thought I was doing something wrong haha
m
@ehcanadian I just tried it, it didn't format it. With ftl files, it gave me this message and didn't do anything when I tried to format it.
With xml files, it didn't just format it incorrectly, it ruined it.
This is from VSCode. Maybe this one gets a fix soon.
I just tried IntelliJ IDEA Ultimate, it works only on ftl files... it is not perfect, but certainly it does a better job than other formatters.