Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic class import. #8

Open
dantleech opened this issue Aug 5, 2018 · 4 comments
Open

Automatic class import. #8

dantleech opened this issue Aug 5, 2018 · 4 comments

Comments

@dantleech
Copy link
Collaborator

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
Copy link
Collaborator

roxma commented Aug 5, 2018

Awesome.

Will look into this.

It should be part of the snippet support.

@roxma
Copy link
Collaborator

roxma commented Jan 23, 2019

This feature depends on ncm2/ncm2#67
It is still WIP

@damianed
Copy link

damianed commented Feb 8, 2022

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

@dantleech
Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants