auto-save.nvim icon indicating copy to clipboard operation
auto-save.nvim copied to clipboard

docs: add example config to disable saving in git commit buffers

Open abeforgit opened this issue 9 months ago • 2 comments

This is something which slightly tripped me up when I installed auto-save. Committing with git commit from the commandline opens up neovim (for most of us, I imagine).

Having autosave trigger on those buffers disables the ability to quit without saving if you change your mind about committing (I often notice I staged too many files at this point).

I don't think it needs to be a default or anything, but it felt like a common usecase which could use a mention in the readme, so people are aware this will happen unless they add the extra config, and it saves people from having to look up exactly what the filetype string is for a commit message buffer.

abeforgit avatar May 14 '25 08:05 abeforgit

Thanks! I think we should add a longer example based on my own config; there are plenty of filetypes where autosave doesn't make sense but setting them as defaults would make the plugin too opinionated. Not to mention the maintenance burden that comes along with such a default. But as an example it definitely makes sense. @abeforgit wanna expand this while you still have the PR open? If not I'll do it myself Later™. Either way, LGTM :)

okuuva avatar May 15 '25 05:05 okuuva

Done! I pretty much copied your config verbatim, cause it's a nice way to structure the config as well

abeforgit avatar May 16 '25 08:05 abeforgit

Sorry for the delay, I didn't realize I could just click the button :see_no_evil: I was already doubting about using the builtins, so we're on the same page :+1:

abeforgit avatar May 20 '25 17:05 abeforgit

Sorry for the delay, I didn't realize I could just click the button 🙈 I was already doubting about using the builtins, so we're on the same page 👍

Hey, no problem! I'm sorry for the delay, I did see the email notification but didn't react to it right away and then I forgot 😓 LGTM, thank you for your contribution!

okuuva avatar May 24 '25 07:05 okuuva