Prettier plugin for formatting Antlers templates used in Statamic CMS. Current stable version is 2.0.5, supporting Prettier 3 (peer dependency >=3). The plugin uses the same formatting engine as Antlers Toolbox. Key differentiators: specifically for Antlers syntax, not generic HTML/Latte. Older v1.x supports Prettier 2, v2.x requires Prettier 3. Installation may require explicit plugin path reference in .prettierrc to avoid module resolution errors.
npm install prettier-plugin-antlersVerified import paths — ran on the pinned version, not inferred.
Minimal .prettierrc configuration to enable Antlers formatting with the plugin.
Update Prettier to version 3 or higher, or install @^1 for Prettier 2 support.
Use full path './node_modules/prettier-plugin-antlers/' in plugins array.
Add in VS Code settings.json: "[antlers]": {"editor.defaultFormatter": "esbenp.prettier-vscode"} and "prettier.documentSelectors": ["**/*.antlers.html"].Install @tailwindcss/prettier-plugin-typography separately and add to plugins list.
For Prettier 2, use path './node_modules/prettier-plugin-antlers/' in .prettierrc. For Prettier 3, ensure plugin is installed and plugins list includes 'prettier-plugin-antlers'.
Add VS Code settings: "[antlers]": {"editor.defaultFormatter": "esbenp.prettier-vscode"} and "prettier.documentSelectors": ["**/*.antlers.html"].Install correct Prettier version: for @^2, install prettier@^3; for @^1, install prettier@^2.