Squashed changes from https://github.com/Pocco81/auto-save.nvim/pull/50 Got too hairy for a GH noob like me to fix properly.