Skip to content

Commit

Permalink
Add deprecation handler for cancel_defered_save
Browse files Browse the repository at this point in the history
  • Loading branch information
primeapple committed Aug 21, 2024
1 parent 54c6ad0 commit 7171cd8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lua/auto-save/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ function Config:handle_deprecations(custom_opts)
custom_opts["execution_message"] = nil
end

if custom_opts["cancel_defered_save"] then
vim.notify(
"The `cancel_defered_save` config option in the auto-save.nvim plugin has been renamed to `cancel_deferred_save`.",
vim.log.levels.WARN
)
custom_opts["cancel_deferred_save"] = custom_opts["cancel_defered_save"]
custom_opts["cancel_defered_save"] = nil
end

return custom_opts
end

Expand Down

0 comments on commit 7171cd8

Please sign in to comment.