1
0
mirror of https://github.com/dcarrillo/dotfiles.git synced 2024-12-22 18:38:00 +00:00

[neovim] Autostore session on VimExit event

This commit is contained in:
Daniel Carrillo 2023-02-05 17:04:33 +01:00
parent 21e220944f
commit b6dd8032be
Signed by: dcarrillo
GPG Key ID: E4CD5C09DAED6E16

View File

@ -33,3 +33,11 @@ vim.api.nvim_create_autocmd({ "BufWinEnter" }, {
end end
end, end,
}) })
-- Autostore session on VimExit
local Session = require("projections.session")
vim.api.nvim_create_autocmd({ "VimLeavePre" }, {
callback = function()
Session.store(vim.loop.cwd())
end,
})