new session handling

This commit is contained in:
2024-12-27 13:40:41 +01:00
parent f499e5c6ec
commit d27336e6df
4 changed files with 21 additions and 14 deletions
+2 -8
View File
@@ -15,7 +15,7 @@ keymap.set('n', 'gn', ':bn<CR>', { silent = true })
keymap.set('n', 'gp', ':bp<CR>', { silent = true })
keymap.set('n', 'g[', ':b#<CR>', { silent = true })
keymap.set('n', '<C-s>', ':w<CR>')
-- keymap.set('n', '<C-s>', ':w<CR>')
keymap.set('n', '<leader>x', ':bd<CR>', { silent = true })
-- primeagen
@@ -89,11 +89,5 @@ end
-- Map <leader>v to the custom function
keymap.set('n', '<leader>v', [[:lua move_to_vertical_split()<CR>]], { noremap = true, silent = true })
-- load the session for the current directory
keymap.set("n", "<leader>qs", function() require("persistence").load() end)
-- select a session to load
keymap.set("n", "<leader>qS", function() require("persistence").select() end)
-- load the last session
keymap.set("n", "<leader>ql", function() require("persistence").load({ last = true }) end)
-- stop Persistence => session won't be saved on exit
keymap.set("n", "<leader>qd", function() require("persistence").stop() end)
keymap.set("n", "<C-s>", '<cmd>Telescope persisted<CR>', { silent = true })
+10 -5
View File
@@ -130,12 +130,17 @@ return {
-- Lua sesion manager
{
"folke/persistence.nvim",
event = "BufReadPre", -- this will only start session saving when an actual file was opened
opts = {
-- add any custom options here
}
"olimorris/persisted.nvim",
lazy = false, -- make sure the plugin is always loaded at startup
config = true
},
-- {
-- "folke/persistence.nvim",
-- event = "BufReadPre", -- this will only start session saving when an actual file was opened
-- opts = {
-- -- add any custom options here
-- }
-- },
-- lazy.nvim Hardtime
-- {
-- "m4xshen/hardtime.nvim",
+2 -1
View File
@@ -26,7 +26,8 @@ telescope.setup({
telescope.load_extension("fzf")
telescope.load_extension("project")
telescope.load_extension('harpoon')
telescope.load_extension("harpoon")
telescope.load_extension("persisted")
require('file_history').setup {
-- This is the location where it will create your file history repository
backup_dir = "~/.file-history-git",