phpcomplete.vim icon indicating copy to clipboard operation
phpcomplete.vim copied to clipboard

autocomplete for Magento

Open alexdrupal opened this issue 8 years ago • 2 comments

Hello

In Magento 1 there is a static method to create classes. For example

Mage::getModel('core/layout') is actually new Mage_Core_Model_Layout()

Your plugin does not autocomplete magento classes yet, but do you think it is possible to make autocompletion to work with Magento's getModel calls?

Thank you

alexdrupal avatar Jan 08 '17 19:01 alexdrupal

Hmm... it sounds like this can't be arranged with the usual docblock comments (you only get one slot for any number of classes). Unfortunately the code doesn't support any plug-in / custom patterns to be added which would allow this to work without adding some hard-coded exception to support this case.

So in short: Yes, it's possible, the most simple thing that could possibly work not even that hard, but I wouldn't like to add it to the codebase like that.

The best option would probably to add some extension point to allow you to add / configure these kind of stuff without blowing up the unfortunately already quite bloated code more.

complex857 avatar Jan 08 '17 23:01 complex857

Thanks!

alexdrupal avatar Mar 31 '18 10:03 alexdrupal