Skip to content

Commit

Permalink
refactor!: remove support for old config
Browse files Browse the repository at this point in the history
  • Loading branch information
olimorris committed Sep 11, 2024
1 parent 1673a29 commit f0f02a9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -459,3 +459,11 @@ If you'd like to ignore certain branches from being saved as a session:
end
}
```

<!-- panvimdoc-ignore-start -->

## :clap: Acknowledgements

- [persistence.nvim](https://github.com/folke/persistence.nvim) for the origin of this plugin and the continued good ideas that I implement

<!-- panvimdoc-ignore-end -->
14 changes: 0 additions & 14 deletions lua/persisted/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit f0f02a9

Please sign in to comment.