-
Notifications
You must be signed in to change notification settings - Fork 671
Description
Please describe the problem you're trying to solve
Hi! I am working on a neovim integration at https://github.com/mikavilpas/yazi.nvim.
It opens yazi in a floating terminal and then returns to neovim once yazi has been closed.
It works nicely for simple cases, but sometimes if I rename files or directories, neovim doesn't know about these changes and still has the old file path open.
Would you be willing to contribute this feature?
- Yes, I'll give it a shot
Describe the solution you'd like
Proposition: Write information about the renamings into a file on exit
Currently yazi has the --chooser-file option which will contain the chosen files after yazi has exited.
Do you think adding a new option like --renamed-files could work? It could be similar but for files that were renamed, and could contain a list of renaming operations like so:
The editor integration could read this file in after yazi has exited, and update its knowledge about the buffers' files in the same order that yazi did. This should give reasonable guarantees that the editor now tracks the correct file paths.
Additional context
If you think this approach could work, I would like to give this a shot myself.
I'm not experienced in rust beyond a few advent of code problems that I did last summer out of interest, but this solution seems quite simple because similar functionality already exists 🤞🏻