Repository navigation
Conversation
|
|
||
| let s:indexerJobId = v:null | ||
| function! phpactor#IndexStart() | ||
| let s:indexerJobId = phpactor#nvim#asyncCall("index", {"watch": v:true}) |
There was a problem hiding this comment.
Abstract the VIM/Neovim job control
|
|
||
| "" | ||
| " Generate accessors for the current class | ||
| command! -nargs=0 PhpactorIndexStart call phpactor#IndexStart() |
There was a problem hiding this comment.
Remove spurious doc
| return job | ||
| endfunc | ||
|
|
||
| let s:stdout = [] |
There was a problem hiding this comment.
I also still have no idea how to catch the response without using non-local scope (like the above).
What do you think about creating a RPC server between vim and one-time phpactor commands? PHPCD mentioned already somewhere had a such solution.
I did not tested behaviour of vim-specific ch_evalraw.
There was a problem hiding this comment.
One idea of this PR was to allow messages to be sent from Phpactor during a command's execution (i.e. to send progress notifications from the Indexer).
I'm not sure there are benefits to having an 2-way RPC connection. I can imagine a use-case would be to cancel an operation - and in that case sending a SIGTERM from VIM should be enough?
There was a problem hiding this comment.
But in anycase it's worth concentrating on the language server solution for now - we can support most of Phpactor's operations (even refactoring) over LSP and it if it works well, it could replace the Phpactor VIM client one day.
Although it's still worth refactoring to use the jobstart / VIM equivalent mechanism rather than system
b95ed15 to
31f48a0
Compare
Adding support for making async calls to Phpactor (mainly to facilitate maintaining an indexer process).
Also adds:
to control the indexer provided by https://github.com/phpactor/workspace-query
TODO: