phpactor / ncm2-phpactor

NCM2 Integration for Phpactor
55 stars 6 forks source link

Automatic class import. #8

Open dantleech opened 6 years ago

dantleech commented 6 years ago

The current develop branch for Phpactor now supports automatically importing classes upon completion with OmniComplete.

recording

Would be great to implement this in NCM2 also.

The suggestion format now looks like:

{
    "type":"class",
    "name":"ProcessUtilsTest",
    "short_description":"Symfony\\Component\\Process\\Tests\\ProcessUtilsTest",
    "class_import":"Symfony\\Component\\Process\\Tests\\ProcessUtilsTest",
}

Where class_import is non-empty it can call the import_class RPC method.

roxma commented 6 years ago

Awesome.

Will look into this.

It should be part of the snippet support.

roxma commented 5 years ago

This feature depends on https://github.com/ncm2/ncm2/issues/67 It is still WIP

damianed commented 2 years ago

Hello @dantleech how did you manage to do that with OmniComplete

dantleech commented 2 years ago

https://phpactor.readthedocs.io/en/master/vim-plugin/man.html

g:phpactorOmniAutoClassImport apparently -- it's been a long time since I use Phpactor over LSP now