Skip to content

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

Merged
okuuva merged 3 commits into
okuuva:mainfrom
abeforgit:patch-1
May 24, 2025
Merged

docs: add example config to disable saving in git commit buffers#73
okuuva merged 3 commits into
okuuva:mainfrom
abeforgit:patch-1

Conversation

@abeforgit

Copy link
Copy Markdown
Contributor

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 abeforgit changed the title Add example config to disable saving in git commit buffers docs: add example config to disable saving in git commit buffers May 14, 2025
@okuuva

okuuva commented May 15, 2025

Copy link
Copy Markdown
Owner

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 :)

@abeforgit

Copy link
Copy Markdown
Contributor Author

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

@okuuva okuuva left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I think the vim.list_contains you had earlier was a better solution and I ended up updating my own config to use that as well. So instead of promoting our own helper that we might axe at some point, we should use a builtin function in the example. Added that as a suggestion.

Comment thread README.md Outdated
Co-authored-by: okuuva <okuuva@users.noreply.github.com>
@abeforgit

Copy link
Copy Markdown
Contributor Author

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 👍

@okuuva

okuuva commented May 24, 2025

Copy link
Copy Markdown
Owner

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 okuuva merged commit 305e448 into okuuva:main May 24, 2025
1 check passed
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 this pull request may close these issues.

2 participants