Closed lukepass closed 2 years ago
All of those transformations are available as standard code actions.
But nothing wrong with using the "standard" Phpactor with VIM - I do this to fill in the missing gaps: https://phpactor.readthedocs.io/en/master/usage/vim-plugin.html
FWIW the only things I use the "standard" plugin for now are:
Thanks for the quick answer! How can I access those code actions? How can I see the exact name to call in the mapping? Could you please make an example for "import all missing classes" and "generate constructor"?
Thanks a lot!
Il mar 17 mag 2022, 20:36 dantleech @.***> ha scritto:
All of those transformations are available as standard code actions.
But nothing wrong with using the "standard" Phpactor with VIM - I do this to fill in the missing gaps https://github.com/phpactor/phpactor/issues/1184: https://phpactor.readthedocs.io/en/master/usage/vim-plugin.html
— Reply to this email directly, view it on GitHub https://github.com/phpactor/coc-phpactor/issues/25#issuecomment-1129193749, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRB2CIZ76M2EM4JGMRT3MDVKPRJNANCNFSM5WE7VWEQ . You are receiving this because you authored the thread.Message ID: @.***>
when i used CoC I had:
nmap <Leader>ca <Plug>(coc-codeaction)
xmap <Leader>ca <Plug>(coc-codeaction-selected)
you just need to invoke this anywhere in the document, if one of the transformations can be applied it will offer you that option.
Yes, I have the same mappings but unfortunately most of the phpactor best features (namely "import all", "transform", "complete constructor" etc...) don't appear in the menu:
many of the "transforms" are now code actions which are shown if they are possible (e.g. complete constructor will show if you have a constructor with no properties or parameter assignments). some exceptions include "generate interface" which is still not supported as a code action.
Import all should show as a code action.
closing for now, but feel free to carry on the discussion
Thank you @dantleech ! Now it's a lot better!
This is the "classic" menu:
These are the new menus:
It seems that the appropriate context-menu appears only when needed, which is even better!
awsome!
Hello and thanks for the good work! Is there a way to access the more advanced phpactor features such as
transform
,context menu
etc...?I mapped these commands:
But I would like to get the menu such as in "standard" phpactor:
Which
<Plug>(coc-XYZ)
should I map?Thanks!