edheltzel / better-nunjucks-for-visual-studio-code

🦾 Better Nunjucks for Visual Studio Code with Snippets
https://marketplace.visualstudio.com/items?itemName=ginfuru.better-nunjucks
MIT License
22 stars 1 forks source link

Formatting Indentation #15

Closed codyjoyce closed 11 months ago

codyjoyce commented 11 months ago

Hi, Love the extension as it's the only one that keeps everything working as it is supposed to.

Just wondering if there is a way to enable indentation when using auto format, so my templates appear as so

{%
    set foo = "bar"
%}

instead of it currently doing

{%
set foo = "bar"
%}

same goes for {% block foo %} tags also. Hoping you can point me in the right direction

edheltzel commented 11 months ago
  1. @codyjoyce There is no built-in formatter with the extension... I do recommend Nunjucks Template Formatter, which does have a few configuration options, but IDK if it will do what you're asking.