mirror of
https://github.com/dcarrillo/dotfiles.git
synced 2024-12-22 06:58:01 +00:00
[neovim] Autostore session on VimExit event
This commit is contained in:
parent
21e220944f
commit
b6dd8032be
@ -24,7 +24,7 @@ vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||
end,
|
||||
})
|
||||
|
||||
-- Disable illuminate on very large files
|
||||
-- Disable illuminate on very large files
|
||||
vim.api.nvim_create_autocmd({ "BufWinEnter" }, {
|
||||
callback = function()
|
||||
local line_count = vim.api.nvim_buf_line_count(0)
|
||||
@ -33,3 +33,11 @@ vim.api.nvim_create_autocmd({ "BufWinEnter" }, {
|
||||
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,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user