⚙️ config(nvim): update persisted config due to recent breaking changes

This commit is contained in:
Sergio Laín 2024-08-09 12:29:14 +02:00
parent 1a2aa13814
commit 7ce2fa14bc
No known key found for this signature in database
GPG key ID: 8429B2EE312F8150

View file

@ -1,8 +1,5 @@
local group = vim.api.nvim_create_augroup("PersistedHooks", {})
vim.api.nvim_create_autocmd({ "User" }, { vim.api.nvim_create_autocmd({ "User" }, {
pattern = "PersistedTelescopeLoadPre", pattern = "PersistedTelescopeLoadPre",
group = group,
callback = function(session) callback = function(session)
-- Save the currently loaded session using a global variable -- Save the currently loaded session using a global variable
require("persisted").save({ session = vim.g.persisted_loaded_session }) require("persisted").save({ session = vim.g.persisted_loaded_session })
@ -36,8 +33,7 @@ return {
end) end)
require("persisted").setup({ require("persisted").setup({
use_git_branch = true, use_git_branch = true,
autoload = false, should_save = function()
should_autosave = function()
if vim.bo.filetype == "dashboard" then if vim.bo.filetype == "dashboard" then
return false return false
end end