{"library":"prettier-plugin-twig-enhancements","title":"prettier-plugin-twig-enhancements","description":"A plugin for prettier-plugin-twig-melody that adds subtle formatting enhancements for Twig/Nunjucks templates. Current stable version is 1.0.1. It improves HTML element formatting to be more like Prettier (e.g., keeping short elements on one line, breaking long attributes) and prints empty {% block %} statements on a single line. No new releases since January 2023; the project is in maintenance mode as the author notes the Twig plugin is not well compatible with Nunjucks. Peer dependencies: prettier ^2.1.2 and prettier-plugin-twig-melody ^0.4.6. Key differentiator: addresses limitations of the base plugin for Nunjucks frontmatter and HTML formatting.","language":"javascript","status":"maintenance","last_verified":"Sat Apr 25","install":{"commands":["npm install prettier-plugin-twig-enhancements"],"cli":null},"imports":["// No default export; plugin is automatically loaded via Prettier config","// No named exports; configure via .prettierrc","// add to .prettierrc:\n{\n  \"twigMelodyPlugins\": [\"node_modules/prettier-plugin-twig-enhancements\"]\n}"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// Install peer deps and this plugin\nnpm install --save-dev prettier@^2.1.2 prettier-plugin-twig-melody@^0.4.6 prettier-plugin-twig-enhancements@^1.0.1\n\n// .prettierrc\n{\n  \"twigMelodyPlugins\": [\"node_modules/prettier-plugin-twig-enhancements\"],\n  \"printWidth\": 80,\n  \"tabWidth\": 2\n}\n\n// Run on .njk file\nnpx prettier --write template.njk","lang":"javascript","description":"Install peer dependencies, configure .prettierrc, and format a Nunjucks template with the enhancements.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}