Open djwave28 opened 4 years ago
Thank you for the report! I think I can add a configuration option for passing filters to php_beautifier.
Could you please include the following:
php-beautifier-format-buffer
It will make writing tests much easier. Thank you!
Cheers, Phil
Phil,
Thanks for the quick reply.
I have played with the filters in the terminal to see what would be a minimum and what would be the desired result. I added some files and the command i used to get the result. php-beautify-filters.zip
I don't know if you can have a look at your phpcbf functionality as well. From what I understand this option should be listed when phpcbf is installed, but I do not see it in emacs as an option.
Thanks a lot. And stay safe! Cheers, Daniel
Thank you for the example files, they're a huge help! I definitely think I can add filter support.
I'll look into the phpcbf issue as well.
Cheers, Phil
Installed phpcbf on linux box and added this repo in emacs.
PHP_Beautify works, but puts all functions and docblocks together. Deleting all empty lines. Option phpcbf is not found at all. It is installed, but the beatify options do not list for phpcbf. Can the PHP_Beautify be set to keep 1 empty line?
GNU Emacs 26.3
I did some work in the terminal with PHP_Beautify and have a positive result with adding a filter
php_beautifier --input unformatted_file.php --output formatted_file.php -s --filters "NewLines(before=if:switch,after=T_CLASS:T_COMMENT:function:T_DOC_COMMENT)"
I don't know enough about emacs (yet) and since this repo already exists...