2021-07-12 10:47:09 +02:00

18 lines
452 B
Lua

local M = {}
---@class PersistenceOptions
local defaults = {
dir = vim.fn.expand(vim.fn.stdpath("config") .. "/sessions/"), -- directory where session files are saved
options = { "buffers", "curdir", "tabpages", "winsize" }, -- sessionoptions used for saving
}
---@type PersistenceOptions
M.options = {}
function M.setup(opts)
M.options = vim.tbl_deep_extend("force", {}, defaults, opts or {})
vim.fn.mkdir(M.options.dir, "p")
end
return M