highlight php code in pug files (VSCode)
Hi, so i want to highlight php code in pug files. I am using VSCode. I have tried to look for extensions for this but i cannot find. The pug code is highlighted properly but not the php code. Is there any way to fix this?
Btw, why is there no pug tag to choose here in #front-end :/
5 Replies
will it even compile?
I know there is things like https://github.com/pug-php/pug
GitHub
GitHub - pug-php/pug: Pug template engine for PHP
Pug template engine for PHP. Contribute to pug-php/pug development by creating an account on GitHub.
or more specific framework templating that allows for use with pug. Not sure if that will help with highlighting syntax though. Typically that is going to be based on language tooling/tokens and your theme.
Yeah, it compiles just fine. I am using gulp and it works just fine to compile. It's just the highlighting that doesnt work properly.
And yeah i know... I should use Vite, but i tried it and got it up and running but i run in to too many issues when i was going to import all the stuff i need so yeah, i stick to gulp for now 🙂
instead of putting your code there, use just an include, and then you have a php file with php syntax highlight
and you decouple both
also, don't use
isset()
, use empty()
or ??