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 :/
No description
5 Replies
b1mind
b1mind4mo ago
will it even compile?
b1mind
b1mind4mo ago
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.
b1mind
b1mind4mo ago
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.
Tok124 (CSS Nerd)
Tok124 (CSS Nerd)OP4mo ago
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 🙂
ἔρως
ἔρως4mo ago
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 ??
Want results from more Discord servers?
Add your server