How to get Prettier fixing to work for mixed HTML/PHP files? #4266
Unanswered
herrbischoff
asked this question in
Q&A - Ask for help with problems
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When working with PHP template files of the Kirby CMS system, I cannot seem to get ALE to work with fixing HTML formatting via
prettier
inside of PHP files. Here's an excerpt of a file calleddefault.php
:Here's the fixer settings I have defined:
When saving the file or calling
:ALEFix
nothing happens. Running Prettier directly via:%!prettier --parser=html
works though.Setting
ft=html
, either directly or via mode line does not change this behavior, only renaming the file to have an.html
extension works as expected. This breaks the CMS expectations regarding file naming however, making this untenable.How do I get this setup to work? I'm looking to format the HTML content of the files. Ideally, the Prettier PHP plugin would work as well but I don't care too much about that.
Beta Was this translation helpful? Give feedback.
All reactions