How to format nunjucks template files in vscode?

after installing the extension of nunjucks, when you open the template file of nunjucks, you will be prompted that there is no formatter for the nunjucks file when you format the file.
how to format the template file of nunjucks?


you can use the plug-in-Nunjucks, and then set

in settings.json
"files.associations": {
    "*.nj": "nunjucks",
},

if you don't want to use plug-ins, you can set * .nj all so that html, will highlight and format in the style of html

"files.associations": {
    "*.nj": "html",
},

can only check whether there are plug-ins for formatting nunjucks, such as: jkformat


it is recommended to install this plug-in in vscode. It is easy to use

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e60af0-458d9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e60af0-458d9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?