Skip to content

Implement a loading message for the vim plugin #747

Closed

Description

@einenlum

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)?

Activity

  1. dantleech commented on Mar 14, 2019

    @dantleech
    Collaborator

    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 :)

  2. camilledejoye commented on May 26, 2019

    @camilledejoye
    Contributor

    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 :)

  3. dantleech commented on May 26, 2019

    @dantleech
    Collaborator

    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 :)

  4. camilledejoye commented on May 26, 2019

    @camilledejoye
    Contributor

    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.

  5. dantleech commented on Feb 24, 2020

    @dantleech
    Collaborator

    We can make find references and such things asynchronous with #890

  6. mamazu commented on Apr 16, 2024

    @mamazu
    Contributor

    The current version already shows progress of finding references. So many this issue can be closed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions