okuuva / auto-save.nvim

🧶 Automatically save your changes in NeoVim
GNU General Public License v3.0
154 stars 8 forks source link

feat: add defer_save, cancel_save, immediate_save trigger options #11

Closed primeapple closed 1 year ago

primeapple commented 1 year ago

This fixes #8

primeapple commented 1 year ago

Just from the codestructure I'm happy now. I'll try using it from next week on and see if there are any bugs.

@okuuva feel free to have a look over it.

I also added some TODOs that might be good for later improvements.

okuuva commented 1 year ago

Excellent work @primeapple! I'll take it into daily use as well to spot any potential problems but LGTM already :)

okuuva commented 1 year ago

And I do agree with the TODOs. I wouldn't maybe drop those in this MR just yet just to keep things as atomic as possible. And I need to comb through the code a few more times since I've also wondered what's the point with those seemingly unused things. Probably remnants from the rewrite Pocco81 did in July 2022 but need to triple check.

primeapple commented 1 year ago

And I do agree with the TODOs. I wouldn't maybe drop those in this MR just yet just to keep things as atomic as possible.

I'll remove the todos and open another PR afterwards to add them, maybe even removing the potential unused code.

Thanks for the review :)

primeapple commented 1 year ago

I have some trouble because it doesn't seem to be possible to set timers to buffer variables, see here: https://www.reddit.com/r/neovim/comments/123y048/cannot_convert_userdata_when_trying_to_set_a/

I might just use the global_vars variable after all...

primeapple commented 1 year ago

Ok. I open this as "Ready for review". It works quite well on my machine now, you are save to try it out @okuuva :)

primeapple commented 1 year ago

Ok, thank you! Let's observe how it behaves in the future ;-)