Closed disrupted closed 10 months ago
Adding associations is simple, but I'm not sure whether the code with template syntaxes (such as {% for ... %}
and {% if ... %}
) can be formatted well or not. Can you rename Jinja2 files to .html
temporarily then let us check the format result?
markup_fmt
already does an excellent job. If I rename the extension to html
or run cat index.jinja2 | dprint fmt --stdin html
the output is perfectly formatted.
Sounds good.
thank you so much!
What a cool new formatter! I've been trying it out with dprint and it works great, especially the ability to format embedded CSS and JS tags is brilliant. I was hoping to use this to format my Jinja2 HTML templates (also known as
htmldjango
filetype in Neovim). Here's an example:index.jinja2
When I run
dprint fmt "**/*.jinja2" --diff | delta
dprint saysNo files found to format with the specified plugins
. That makes sense, sincemarkup_fmt
expects files with the.html
extension. As expected, it works with this trickcat index.jinja2 | dprint fmt --stdin html
.I was hoping to add associations for custom file extensions. I tried it with the following minimal config
dprint.jsonc
but I am getting the error