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

Close buffer when deleting file #11

Open
Rolv-Apneseth opened this issue Aug 12, 2023 · 5 comments
Open

Close buffer when deleting file #11

Rolv-Apneseth opened this issue Aug 12, 2023 · 5 comments

Comments

@Rolv-Apneseth
Copy link

Hey, thanks for making this. Just a quick question, when deleting a file, is there some way to make sure the buffer for the deleted file is also closed?

@kelly-lin
Copy link
Owner

Hey @Rolv-Apneseth,

Yep, should be possible, I ran into this issue myself while using the plugin. I will add this to my todo list.

It will probably be turned on by default and the user will be prompted to confirm buffer deletion.

Thank you for the feature request, your input is appreciated.

@Rolv-Apneseth
Copy link
Author

Awesome, thanks. Would it be possible to have a way to disable that prompt if you're going to add that? Or perhaps the option (which is enabled by default) to auto close the buffer means no prompt, and disabled means it will prompt you if you want to close?

@kelly-lin
Copy link
Owner

Yeah, it would be added in as a configuration flag for sure. However, I think it is a better user experience if the user is prompted as the default option (the opposite of what you suggested). The reasoning behind this is that it is consistent with the behaviour of neovim when you modify/delete a file from somewhere other than neovim (like the "buffer has been modified, do you want to reload the file?").

@Rolv-Apneseth
Copy link
Author

Yeah makes sense, as long as there is an option to disable the prompt that sounds great

@Rolv-Apneseth
Copy link
Author

If you don't have so much time to work on this, I could try have a go at implementing this, if you could just provide some guidance on how you would go about doing it (plugin noob)

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

No branches or pull requests

2 participants