Closed mattwaler closed 11 months ago
What formatter do you prefer, for example?
Exposing something similar to how prettier works would be awesome if possible! That or just exposing user settings in their JSON file for specific format options like wrapping attributes on new lines, indenting the head and body tags or not, stuff like that.
I'm not entirely sure this is possible but it would be great if it was!
Thanks for this extension - I've just tried a bunch of them and yours is best. 🥇
The way the Nunjucks Template Formatter extension makes it easy to change settings is great. Screenshot below. That project is now archived so maybe you could salvage some of the code from there?
For now, do you know if there's a way to force the "End self-closing tags with a space" setting right now? Nunjucks Template Formatter and yours both use prettydiff2 so I'm assuming it should be possible?
Many thanks!
I would also like to be able to keep line breaks. It makes my files much more legible!
Closing because this seems inactive!
@anghelos a "preserveEmptyLine" configuration was added.
Im about to see Nunjucks Template Formatter Any suggestion is welcome
@eseom awesome, thanks! It looks like there are still a few bugs with indentation and new lines, however. I'll open a new issue for clarity.
It would really help if the extension could respect/inherit the html.format
settings, now when I activate this extension, it stops respecting the html.format.wrapAttributes
setting. I don't know the complexity of implementing such a feature but I don't understand why VS Code formatters for HTML-like template languages have this problem and apparently have to reimplement basic HTML formatter settings.
It would really help if the extension could respect/inherit the
html.format
settings, now when I activate this extension, it stops respecting thehtml.format.wrapAttributes
setting. I don't know the complexity of implementing such a feature but I don't understand why VS Code formatters for HTML-like template languages have this problem and apparently have to reimplement basic HTML formatter settings.
First of all, because of the template syntax like {{ variable }}
, a new formatter have to be implemented for the formatting. This extension is using prettydiff2
, Fortunately it supports a lot of options for formatting. I think it would support the option like the wrapAttributes
. Instead of inheriting the original formatter, it had better to adjust the options into prettydiff2
.
Could you list what options would be needed except wrapAttributes
?
It would be great if this extension had options like here VS Code Twig Language 2
as an example, some of the options from there:
Closing as stale.
Hello!
First of all, this is the best looking nunjucks formatter available, well done!
I was wondering if there is any way to tweak the underlying formatter either via a config file in projects or via VS code settings? I don't see that in the current README.