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

Add customized events for operation like file renaming #494

Closed
zhou13 opened this issue Oct 4, 2024 · 0 comments · Fixed by #495
Closed

Add customized events for operation like file renaming #494

zhou13 opened this issue Oct 4, 2024 · 0 comments · Fixed by #495

Comments

@zhou13
Copy link

zhou13 commented Oct 4, 2024

Create the issue per discussion in #493

This can be helpful to trigger the LSP/refactoring based on file renaming from yazi.nvim.

mikavilpas added a commit that referenced this issue Oct 4, 2024
Problem
=======

When files are renamed or moved in yazi, there is no way for other
plugins to know about this. If the user uses yazi.nvim along with other
plugins that need to react to files being renamed or moved, it cannot be
done. This means that other plugins that depend on yazi cannot react to
these changes.

Currently yazi.nvim can only react to LSP delete/rename events, but
plugins that operate outside of the LSP protocol are not supported.

Solution
========

Add a new Neovim autocmd/event called `YaziRenamedOrMoved` that is
emitted when files are renamed or moved. This event will contain a table
of the paths that were renamed or moved.

Previously we were already emitting a Neovim event for `YaziDDSHover` -
now we have two custom events.

Closes #494
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant