kelly-lin / ranger.nvim

Ranger plugin for neovim
MIT License
152 stars 13 forks source link

[FEATURE] Close buffers for files deleted in ranger #15

Closed Rolv-Apneseth closed 7 months ago

Rolv-Apneseth commented 11 months ago

In relation to #11

Finally took the time to make a serious attempt at this. Seems to work from my testing but let me know what you think when you have the time.

Unfortunately there's nothing convenient from ranger like that choosefiles flag which would list deleted files so I took a different approach. Instead I'm storing the listed buffers that point to existing files before opening ranger, then going through that list afterwards and closing buffers for files which no longer exist.

kelly-lin commented 9 months ago

Hey @Rolv-Apneseth, thanks for the PR! I also want to apologise for not getting around to having a look at this PR till now.

The logic looks sound. My only comment is that if we can put this feature under an option with the default set as disabled.

Thanks.

Rolv-Apneseth commented 9 months ago

No problem. Sure yeah I can have a look at doing that.

Also, just to let you know, I turned my fork into a separate plugin, making sure to credit you of course

Rolv-Apneseth commented 9 months ago

Is something like that what you had in mind?