Closed elle-the-dev closed 4 years ago
That is just talking about autocompletion. "auto phpdoc creation" is about generating phpdoc blocks for methods, with things like @throws
for any exceptions that are unhandled.
You right. I also looked for any code about Phpdoc in coc-phpls. I found nothing. So isnāt currently support I guess. Now the only solution is to implement it ourselves.
there is : https://github.com/kkoomen/vim-doge
Thanks @tofulm I didnāt know it.
@derekhamilton
In the current version of "intelephense", the generation of phpdocs is possible from code actions.
It is available in coc-phpls using the CodeAction feature. <Plug>(coc-codeaction)
You will need to purchase an intelephense license and have it set to intelephense.licenceKey.
Ref: https://github.com/bmewburn/vscode-intelephense/commit/c4423153254acf5267df9bd6508c7f44e4995902
Demo(Vim8)
I tried DEMO with vim8, but there is a slight difference in the display on nvim.
If you want to check the atmosphere of the display in nvim, please refer to this issue. https://github.com/marlonfan/coc-phpls/issues/68#issuecomment-657881618
Thank you! For any other onlookers, if intelephense is not up-to-date, you'll get an error coc.nvim: CodeAction not found
when calling <Plug>coc-codeaction
.
A feature of intelephense is "Configurable auto phpdoc creation that infers return types and identifies thrown exceptions." Is there a way to call this via coc.nvim?