How to use Laravel Pint in Zed
Just a quick refresher for myself in the future or for you if you're looking for how to format your files on save automatically with Laravel Pint while using the fantastic Zed editor.
In your global settings.json or in the project settings.json this is the part you want to add:
{
"languages": {
"PHP": {
"formatter": {
"external": {
"command": "bash",
"arguments": [
"-c",
"cat > {buffer_path} && ./vendor/bin/pint --quiet {buffer_path} && cat {buffer_path}"
]
}
}
}
},
"format_on_save": "on"
}