Skip to content

Plugin for Prettier to support formatting Twig language

License

Notifications You must be signed in to change notification settings

rholdos/prettier-plugin-twig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This is an unofficial Prettier plugin for formatting Twig language.
Combines features of Melody plugin and these enhancements, and wraps the plugin for easier installation.

Install

  • This plugin works with Prettier installed globally
  • If you don't have any official Prettier plugin installed currently, just create a folder named @prettier inside your global node_modules directory (for example: ~/.nvm/versions/node/v16.13.0/lib/node_modules/@prettier/ on OSX), and copy the plugin-twig from repository into this folder. Prettier will automatically recognize and register the plugin, like it would normally do with official ones.
  • Then just run the npm install inside the plugin folder and you're set up.

Usage

prettier --write "**/*.twig"

Options

To configure the plugin behaviour, check available options, these can be put into the .prettierrc config file.

About

Plugin for Prettier to support formatting Twig language

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages