Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 686 Bytes

README.md

File metadata and controls

32 lines (21 loc) · 686 Bytes

Prettier for Melody

Prettier Banner


This Plugin enables Prettier to format .twig files, as well as .html.twig.

Install

npm i -D @nsetyo/prettier-plugin-twig

Use

Add plugin in prettier config (e.g: .prettierrc)

{
    "plugins": ["@nsetyo/prettier-plugin-twig"]
}
prettier --write "**/*.html.twig"

Credit

Most of the code in this plugin is taken from https://github.com/trivago/prettier-plugin-twig-melody, which seems not maintained anymore. This fork try to fix the issue there and add support for new Twig feature