You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Implement a loading message for the vim plugin #747
In a big codebase, when we try to find references of a class member, PHPActor can be quite long to handle the task (which is normal). Then VIM hangs for maybe 30 seconds, with no possibility of interacting and no message.
Could it be possible to add a message from the plugin, to say that it is loading (to know that VIM is not just dead)?
It should even be possible to do it asynchronously now (with both neovim and vim), but currently it's a blocking synchronous operation.
VIM sends the request to Phpactor via. RPC, and Phpactor blocks - we could immediately return a callback to VIM to show a message (and then VIM would immediately callback to Phpactor and perform the search). But not sure it's worth it.
A better way forward would be to make it an async operation and refactor Phpactor RPC to allow intremediate responses to be sent (e.g. send a progress update back to VIM every n seconds / files), but ... effort :)
I'm wondering if asynchronous refactoring won't be dangerous.
We could overwrite some modifications done by PHPActor if the file is currently open in our editor and we modify it.
But it would be a great fixture to find references in the project.
Like Einenlum I work with a pretty large code base which make those tasks quite long.
It's a bummer to have to wait, not being able to do anything in Vim, in the meanwhile.
I will also use this opportunity to ask if it's possible to tell to PHPActor to ignore some directories when trying to refactor or looking for references ?
But keeping them managed by git ?
I didn't find anything about that for now but I just started my research :)
I'm wondering if asynchronous refactoring won't be dangerous
Possibly, but it's already the case that open files can be changed by project-wide refactorings.
I will also use this opportunity to ask if it's possible to tell to PHPActor to ignore some directories when trying to refactor or looking for references ?
It's not currently possible, although "easy" to implement. It also depends on the exact use case -- per refactoring or globally?. But let's open a separate ticket to discuss further :)
It's not currently possible, although "easy" to implement. It also depends on the exact use case -- per refactoring or globally?. But let's open a separate ticket to discuss further :)
Thanks, I will keep searching and came back with a new issue if I still feel the need.
Activity
dantleech commentedon Mar 14, 2019
It should even be possible to do it asynchronously now (with both neovim and vim), but currently it's a blocking synchronous operation.
VIM sends the request to Phpactor via. RPC, and Phpactor blocks - we could immediately return a callback to VIM to show a message (and then VIM would immediately callback to Phpactor and perform the search). But not sure it's worth it.
A better way forward would be to make it an async operation and refactor Phpactor RPC to allow intremediate responses to be sent (e.g. send a progress update back to VIM every n seconds / files), but ... effort :)
camilledejoye commentedon May 26, 2019
Hi,
I'm wondering if asynchronous refactoring won't be dangerous.
We could overwrite some modifications done by PHPActor if the file is currently open in our editor and we modify it.
But it would be a great fixture to find references in the project.
Like Einenlum I work with a pretty large code base which make those tasks quite long.
It's a bummer to have to wait, not being able to do anything in Vim, in the meanwhile.
I will also use this opportunity to ask if it's possible to tell to PHPActor to ignore some directories when trying to refactor or looking for references ?
But keeping them managed by git ?
I didn't find anything about that for now but I just started my research :)
dantleech commentedon May 26, 2019
Possibly, but it's already the case that open files can be changed by project-wide refactorings.
It's not currently possible, although "easy" to implement. It also depends on the exact use case -- per refactoring or globally?. But let's open a separate ticket to discuss further :)
camilledejoye commentedon May 26, 2019
Thanks, I will keep searching and came back with a new issue if I still feel the need.
dantleech commentedon Feb 24, 2020
We can make find references and such things asynchronous with #890
mamazu commentedon Apr 16, 2024
The current version already shows progress of finding references. So many this issue can be closed now.