phpStorm and MODX

I have recently started using phpStorm and have done the various steps for deployment and whatnot.
I wanted to know if anyone has built or knows where to look/download a language MODX that makes phpStorm recognize at least the essential tags.
Also if you have any tips, utilities, tricks to share, I welcome them :grinning_face:
Thanks in advance

Do you mean things like snippet and chunk tags, or something else?

I’ve used PhpStorm for a long time and haven’t need it to recognize those. I did modify it to recognize some custom HTML tags like <fixedpre>.

Yes, I mean MODX tags.
It doesn’t recognize [[- comment]] [[~link]]
[[snippet? &par=…]] etc. etc.
It doesn’t recognize them as such. It would be nice, for example, if the snippet name and the parameters passed changed color.

There exists an extension for MODX syntax highlighting in Visual Studio CodeIntelliSense for MODX.

See this thread in the russian MODX forum:


I don’t think there is something similar for phpStorm. At least according to the comments in the thread I linked above.

Thanks, that’s exactly what I was looking for, but there’s nothing for phpStorm.
I saw that there are plugins for Drupal, Joomla, and WordPress, but no MODx, and that seemed strange to me, given the brilliant minds who use MODx with phpStorm.

Other scattered questions about setting up the phpStorm/MODx ecosystem

Do you associate .tpl files with HTML files or leave them smarty?
I assume you use Live Templates, or do they make no sense?
If so, do you include the various snippets separately, or is there a file online that I can use to import them all?

Finally, a question that’s more about MODX than the ecosystem.
I’ve never used them, and at this point I don’t know why.
Static files, especially snippets, seem like a very powerful solution.
Am I wrong?
Are there any disadvantages to using them compared to traditional insertion from the MODx manager?

1 Like

I do use Live Templates a lot. Their fairly quick to create once you get used to it, though it gets somewhat cumbersome if you have a lot of them.

I’ve never been a fan of static elements. I’m sure they’re fine if you’re careful, but I had several instances of losing work with them and have avoided them ever since. I generally write code in PhpStorm because of its powerful error checking, then cut and paste it into snippets and plugins. I do the same with code I post here in answer to questions. When I think that I can write correct code without checking it, I’m usually wrong, mainly because I’ve come to depend on PhpStorm’s autocompletion and make mistakes when it’s not there.

PhpStorm has a whole “deployment” infrastructure, that would probably work well with static files, but when I last used it, I found it painfully slow (along with their database feature) and I could cut and paste from PhpStorm much faster. Admittedly, that was some time ago, so things may have changed.

When I create .tpl chunks in PhpStorm, I always give them the .html suffix to get PhpStorm’s autocompletion and HTML error checking.

2 Likes