Added session manager

This commit is contained in:
2023-09-25 13:59:41 +02:00
parent 3252e145ec
commit 3334cd2321
2 changed files with 32 additions and 1 deletions

View File

@@ -15,7 +15,7 @@ return {
dashboard.section.header.val = logo dashboard.section.header.val = logo
dashboard.section.buttons.val = { dashboard.section.buttons.val = {
dashboard.button("f", "" .. "Find files", ":Telescope find_files <CR>"), dashboard.button("f", "" .. "Find files", ":Telescope find_files <CR>"),
dashboard.button("p", "" .. "Select project", ":Telescope project <CR>"), dashboard.button("p", "" .. "Select project", ":Telescope neovim-project history <CR>"),
dashboard.button("n", "" .. "Neorg", ":Neorg workspace main <CR>"), dashboard.button("n", "" .. "Neorg", ":Neorg workspace main <CR>"),
dashboard.button("l", "󰚰 " .. "Lazy sync", ":Lazy sync <CR>"), dashboard.button("l", "󰚰 " .. "Lazy sync", ":Lazy sync <CR>"),
} }

View File

@@ -0,0 +1,31 @@
return {
"coffebar/neovim-project",
priority = 100,
dependencies = {
{ "nvim-lua/plenary.nvim" },
{ "nvim-telescope/telescope.nvim", tag = "0.1.0" },
{ "Shatur/neovim-session-manager" },
},
init = function()
vim.opt.sessionoptions:append("globals")
end,
config = function()
local project = require("neovim-project")
local smconfig = require("session_manager.config")
local sessionmanager = require("session_manager")
project.setup({
projects = {
"~/git/*",
"~/Appdata/Local/nvim",
},
})
sessionmanager.setup({
autoload_mode = smconfig.AutoloadMode.Disabled,
})
vim.keymap.set("n", "<leader>ps", "<cmd>Telescope neovim-project discover<CR>")
vim.keymap.set("n", "<leader>ph", "<cmd>Telescope neovim-project history<CR>")
end,
}