ncm2-phpactor icon indicating copy to clipboard operation
ncm2-phpactor copied to clipboard

Automatic class import.

Open dantleech opened this issue 7 years ago • 4 comments

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.

dantleech avatar Aug 05 '18 09:08 dantleech

Awesome.

Will look into this.

It should be part of the snippet support.

roxma avatar Aug 05 '18 09:08 roxma

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

roxma avatar Jan 23 '19 16:01 roxma

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

damianed avatar Feb 08 '22 04:02 damianed

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

dantleech avatar Feb 08 '22 18:02 dantleech