new session handling

main
Mathias Rothenhaeusler 2024-12-27 13:40:41 +01:00
parent f499e5c6ec
commit d27336e6df
4 changed files with 21 additions and 14 deletions

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 })

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",

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",

View File

@ -6,6 +6,7 @@
-- be extended to other languages as well. That's why it's called
-- kickstart.nvim and not kitchen-sink.nvim ;)
return {
-- NOTE: Yes, you can install new plugins here!
'mfussenegger/nvim-dap',
@ -25,6 +26,12 @@ return {
local dap = require 'dap'
local dapui = require 'dapui'
require("nvim-dap-virtual-text").setup {
enabled = true,
virt_text_pos = vim.fn.has 'nvim-0.10' == 1 and 'inline' or 'eol',
}
require('mason-nvim-dap').setup {
-- Makes a best effort to setup the various debuggers with
-- reasonable debug configurations