Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add targeted communication with the yazi instance (opt-in) #225

Merged
merged 1 commit into from
Jul 19, 2024

Commits on Jul 19, 2024

  1. feat: add targeted communication with the yazi instance (opt-in)

    This is a technical change with no change in features for the end user.
    Right now you can opt in to trying it out by setting
    `use_yazi_client_id_flag = true` in your config (run `:checkhealth
    yazi` afterwards).
    
    This will probably be the default mode of communication in the future.
    
    Before this change, real time communication with the embedded yazi
    instance has been possible, but it has had some limitations:
    
    - yazi.nvim had the possibility of sending commands to yazi, but the
      communication has been global, meaning that all yazi instances running
      on the system have been able to receive these messages. This has been
      too dangerous to implement, as making yazi do any actions could have
      unintended side effects if multiple yazis execute the same actions,
      potentially in different directories on the system.
    - similarly, receiving events from yazi has been limited to receiving
      events from all yazis running on the system. This has not been a
      problem so far since the events we use (rename, delete, trash, move,
      cd, hover, bulk) are not dangerous, and typically the user only
      focuses on one yazi.nvim instance at a time anyway.
    
    This change removes this limitation from future features by giving the
    yazi instance shown by this plugin a unique identifier. This identifier
    can later be used to send and receive messages with this specific yazi
    instance.
    
    See these for more information and context:
    
    - sxyazi/yazi#989 (comment)
    - sxyazi/yazi#1305
    mikavilpas committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    de742bd View commit details
    Browse the repository at this point in the history