Skip to content

nsetyo/prettier-plugin-twig

Repository files navigation

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

About

Twig Prettier Plugin

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages