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

How to get import auto completion?

Open kmbt opened this issue 6 years ago • 4 comments

When I am writing a use statement I am getting a lot of suggestions from cwd with no useful class path suggestions, like this:

screenshot from 2019-01-23 17-14-42

What I would expect is a list of next possible class path components - not files from my cwd.

If I start to write the class name (without the path) in the use statement i get this:

screenshot from 2019-01-23 17-12-24

so I know that the class names are recognized, however I don't know any means of inserting the displayed path.

Is there a way to get class path components suggested while writing? Is there a way to insert the class path from the list seen in the second screenshot?

kmbt avatar Jan 23 '19 16:01 kmbt

I have tried disabling ncm2/ncm2-path, but that gave no results.

kmbt avatar Jan 23 '19 16:01 kmbt

Unfortunately, this is still WIP https://github.com/phpactor/ncm2-phpactor/issues/8

roxma avatar Jan 23 '19 16:01 roxma

Thank you for your prompt answer! I guess, for now, I will stick to using :call phpactor#UseAdd().

kmbt avatar Jan 23 '19 16:01 kmbt

A workaround maybe: au CompleteDone *.php call phpactor#UseAdd()

The work of #8, optimally needs uniformed ncm2 API . It doesn't stop you from hacking the editor yourself.

roxma avatar Jan 23 '19 16:01 roxma