Refactored auto-session for nvim, added snacks dashboard, not configured
yet
This commit is contained in:
@@ -20,7 +20,6 @@
|
||||
"gopher.nvim": { "branch": "main", "commit": "9db5931af1293ae52500921d92c02145d86df02c" },
|
||||
"harpoon": { "branch": "harpoon2", "commit": "ed1f853847ffd04b2b61c314865665e1dadf22c7" },
|
||||
"helpview.nvim": { "branch": "main", "commit": "493060153bc99927a64b203ea2ee49bb2884c190" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
|
||||
"leap.nvim": { "branch": "main", "commit": "2b68ddc0802bd295e64c9e2e75f18f755e50dbcc" },
|
||||
@@ -52,7 +51,6 @@
|
||||
"nvim-lsp-file-operations": { "branch": "master", "commit": "9744b738183a5adca0f916527922078a965515ed" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "5af60bbb835d5b6efdc64cdff2a5b27cde4120de" },
|
||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||
"nvim-notify": { "branch": "master", "commit": "b5825cf9ee881dd8e43309c93374ed5b87b7a896" },
|
||||
"nvim-scrollbar": { "branch": "main", "commit": "6994eb9f73d5fdc36ee2c8717940e8c853e51a49" },
|
||||
"nvim-spectre": { "branch": "master", "commit": "c4abcde7b56574c2dfb7d0137b2481c5b2154372" },
|
||||
"nvim-surround": { "branch": "main", "commit": "0e62500b98f4513feaaf7425c135472457ea5b7d" },
|
||||
@@ -70,13 +68,10 @@
|
||||
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
|
||||
"spring-boot.nvim": { "branch": "main", "commit": "218c0c26c14d99feca778e4d13f5ec3e8b1b60f0" },
|
||||
"sqls.nvim": { "branch": "main", "commit": "d1bc5421ef3e8edc5101e37edbb7de6639207a09" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
|
||||
"tiny-inline-diagnostic.nvim": { "branch": "main", "commit": "cd401038de4cbae37651cfe02510294ccf5cdc98" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
||||
"undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" },
|
||||
"vim-be-good": { "branch": "master", "commit": "0ae3de14eb8efc6effe7704b5e46495e91931cc5" },
|
||||
"vim-illuminate": { "branch": "master", "commit": "1fa4b23409e22a03823648e344c77f260e2572cb" },
|
||||
|
||||
@@ -38,6 +38,7 @@ vim.opt.termguicolors = true
|
||||
vim.opt.laststatus = 3 -- views can only be fully collapsed with the global statusline
|
||||
vim.opt.splitkeep = 'screen' -- for edgy.nvim
|
||||
vim.opt.inccommand = 'split' -- shows preview for commands like :%s/from/to
|
||||
vim.opt.sessionoptions = 'buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions'
|
||||
|
||||
-- Disable warnings for missing language providers
|
||||
vim.g.loaded_node_provider = 0
|
||||
|
||||
@@ -1,29 +1,18 @@
|
||||
return {
|
||||
'rmagatti/auto-session',
|
||||
lazy = false,
|
||||
config = function()
|
||||
vim.opt.sessionoptions = 'blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions'
|
||||
require('auto-session').setup({
|
||||
log_level = 'error',
|
||||
auto_session_suppress_dirs = { '~/', '/' },
|
||||
session_lens = { load_on_setup = false },
|
||||
no_restore_cmds = {
|
||||
function()
|
||||
if vim.fn.argc() == 0 then
|
||||
vim.cmd('Alpha')
|
||||
end
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
local session_lens_setup_done = false
|
||||
local function search_session()
|
||||
if not session_lens_setup_done then
|
||||
require('auto-session').setup_session_lens()
|
||||
session_lens_setup_done = true
|
||||
end
|
||||
require('auto-session.session-lens').search_session()
|
||||
end
|
||||
vim.keymap.set('n', '<C-s>', search_session, { desc = '[S]ession Manager' })
|
||||
end,
|
||||
opts = {
|
||||
auto_session_suppress_dirs = { '~/', '/' },
|
||||
session_lens = { load_on_setup = false },
|
||||
no_restore_cmds = {
|
||||
function()
|
||||
if vim.fn.argc() == 0 then
|
||||
Snacks.dashboard()
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ '<C-s>', '<cmd>SessionSearch<cr>', desc = '[S]ession Manager' },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ return {
|
||||
},
|
||||
|
||||
bigfile = {},
|
||||
dashboard = {},
|
||||
gitbrowse = {},
|
||||
image = {},
|
||||
indent = {
|
||||
|
||||
Reference in New Issue
Block a user