Load session lost syntax
sphynx79 opened this issue · comments
Sphynx commented
I use this plugin perfectly, but when i try use with auto-session plugin, reload session broke Vimade visualization
This is my sessionoptions:
vim.opt.sessionoptions = { "blank", "buffers", "curdir", "folds", "help", "tabpages", "winsize", "resize", "winpos", "terminal" }
and this is my configuration:
vim.g.vimade = {
fadelevel = 0.6,
usecursorhold = 1,
enabletreesitter = 1,
enablesigns = 1
}
require("util").define_augroups {
_vimade = {
{
"FileType",
"nerdtree,vista,neoterm,dapui_scopes,dapui_breakpoints",
"VimadeBufDisable",
},
}
}
local M = {}
local function closeNerdTree()
if (vim.api.nvim_call_function('exists', {"t:NERDTreeBufName"}) == 1 and vim.fn.bufwinnr(vim.t.NERDTreeBufName) ~= -1) then
vim.cmd([[NERDTreeClose]])
end
vim.cmd([[VimadeDisable]])
end
local function enableVimade()
vim.cmd([[VimadeEnable]])
end
local opts = {
auto_session_enabled = true,
auto_save_enabled = false,
auto_restore_enabled = false,
pre_save_cmds = { closeNerdTree },
post_save_cmds = { enableVimade }
}
function M.setup()
require('auto-session').setup(opts)
end
return M