fixed session save and updated plugins added vue and js for tree sitter
This commit is contained in:
parent
d45eac3184
commit
bbc67edf62
|
@ -1 +1,4 @@
|
||||||
setlocal tabstop=4 shiftwidth=4 softtabstop=4 expandtab
|
setlocal tabstop=4
|
||||||
|
setlocal shiftwidth=4
|
||||||
|
setlocal softtabstop=4
|
||||||
|
setlocal expandtab
|
||||||
|
|
|
@ -1 +1,4 @@
|
||||||
setlocal tabstop=2 shiftwidth=2 softtabstop=2 expandtab
|
setlocal tabstop=8
|
||||||
|
setlocal shiftwidth=2
|
||||||
|
setlocal softtabstop=2
|
||||||
|
setlocal expandtab
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
-- my basic session management
|
-- my basic session management
|
||||||
|
|
||||||
local session_file = 'session.vim'
|
local session_file = 'session.vim'
|
||||||
|
local auto_save = false
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd({'VimEnter'}, {
|
vim.api.nvim_create_autocmd({'VimEnter'}, {
|
||||||
callback = function ()
|
callback = function ()
|
||||||
if vim.fn.argc() == 0 and vim.fn.filereadable(session_file) == 1 then
|
if vim.fn.argc() == 0 and vim.fn.filereadable(session_file) == 1 then
|
||||||
vim.cmd('source ' .. session_file)
|
vim.cmd('source ' .. session_file)
|
||||||
|
auto_save = true
|
||||||
vim.notify("Session restored from " .. session_file, vim.log.levels.INFO, {title = "Sessions"})
|
vim.notify("Session restored from " .. session_file, vim.log.levels.INFO, {title = "Sessions"})
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
@ -14,7 +16,7 @@ vim.api.nvim_create_autocmd({'VimEnter'}, {
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd({'VimLeave'}, {
|
vim.api.nvim_create_autocmd({'VimLeave'}, {
|
||||||
callback = function ()
|
callback = function ()
|
||||||
if vim.fn.argc() == 0 then
|
if vim.fn.argc() == 0 or auto_save == true then
|
||||||
vim.cmd('mks! ' .. session_file)
|
vim.cmd('mks! ' .. session_file)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in New Issue