🐛 fix(nvim): persisted autocmd is now afected at init
This commit is contained in:
parent
12798112ba
commit
2d27e7e8e8
1 changed files with 12 additions and 11 deletions
|
@ -1,4 +1,12 @@
|
||||||
vim.api.nvim_create_autocmd({ "User" }, {
|
return {
|
||||||
|
{
|
||||||
|
"folke/persistence.nvim",
|
||||||
|
enabled = false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"olimorris/persisted.nvim",
|
||||||
|
init = function()
|
||||||
|
vim.api.nvim_create_autocmd({ "User" }, {
|
||||||
pattern = "PersistedTelescopeLoadPre",
|
pattern = "PersistedTelescopeLoadPre",
|
||||||
callback = function(session)
|
callback = function(session)
|
||||||
-- Save the currently loaded session using a global variable
|
-- Save the currently loaded session using a global variable
|
||||||
|
@ -7,15 +15,8 @@ vim.api.nvim_create_autocmd({ "User" }, {
|
||||||
-- Delete all of the open buffers
|
-- Delete all of the open buffers
|
||||||
vim.api.nvim_input("<ESC>:%bd!<CR>")
|
vim.api.nvim_input("<ESC>:%bd!<CR>")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
end,
|
||||||
return {
|
|
||||||
{
|
|
||||||
"folke/persistence.nvim",
|
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"olimorris/persisted.nvim",
|
|
||||||
lazy = false,
|
lazy = false,
|
||||||
config = function()
|
config = function()
|
||||||
LazyVim.on_load("telescope.nvim", function()
|
LazyVim.on_load("telescope.nvim", function()
|
||||||
|
|
Loading…
Add table
Reference in a new issue