adael / SublimePhpCsFixer

Run php-cs-fixer code formatter to format php code from your favorite text editor
MIT License
71 stars 14 forks source link

Laravel Pint support #45

Open plakhin opened 7 months ago

plakhin commented 7 months ago

It would be super nice to have Laravel Pint support. Running it is as easy as pint $filename so should be very quick to implement (unfortunately one can't just set "path": "pint" as it needs only 1 param that should be a path or a filename). And it is based on PHP-CS-Fixer, so any PHP-CS-Fixer rules can be used in pint config.

adael commented 7 months ago

Hi! This is an interesting suggestion, thank you! I'll take a closer look as soon as I can!

plakhin commented 7 months ago

If someone interested find this issue, currently I'm using this simple workaround:

config:

{
    "on_save": true,
    "path": "/Users/stan/php-cs-fixer-pint.sh",
}

php-cs-fixer-pint.sh:

#!/bin/sh

pint $4