From f0f02a990c3df2a97dfea9636f719137867d0a52 Mon Sep 17 00:00:00 2001 From: olimorris Date: Wed, 11 Sep 2024 17:23:15 +0100 Subject: [PATCH] refactor!: remove support for old config --- README.md | 8 ++++++++ lua/persisted/init.lua | 14 -------------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 4d872fc..8ffa2e8 100644 --- a/README.md +++ b/README.md @@ -459,3 +459,11 @@ If you'd like to ignore certain branches from being saved as a session: end } ``` + + + +## :clap: Acknowledgements + +- [persistence.nvim](https://github.com/folke/persistence.nvim) for the origin of this plugin and the continued good ideas that I implement + + diff --git a/lua/persisted/init.lua b/lua/persisted/init.lua index da0edc1..dc7ac2c 100644 --- a/lua/persisted/init.lua +++ b/lua/persisted/init.lua @@ -218,20 +218,6 @@ end ---Setup the plugin ---@param opts? table function M.setup(opts) - -- Account for old config options - if opts and opts.autosave then - opts.autostart = opts.autosave - end - if opts and opts.should_autosave then - opts.should_save = opts.should_autosave - end - if opts and opts.allowed_dirs == nil then - opts.allowed_dirs = {} - end - if opts and opts.ignored_dirs == nil then - opts.ignored_dirs = {} - end - config = vim.tbl_deep_extend("force", require("persisted.config"), opts or {}) M.config = config