feat: cleanup + autosession + undotree

This commit is contained in:
2025-11-21 10:34:31 +01:00
parent 39faf19824
commit 210eb7060f
8 changed files with 167 additions and 121 deletions

View File

@@ -1,41 +1,37 @@
{
"aerial.nvim": { "branch": "master", "commit": "2aeafd99937602fc40609ffffbdd2f99d77343e9" },
"aerial.nvim": { "branch": "master", "commit": "c7cbbad40c2065fccfd1f1863bb2c08180c0533d" },
"autoclose.nvim": { "branch": "main", "commit": "3f86702b54a861a17d7994b2e32a7c648cb12fb1" },
"blink.cmp": { "branch": "main", "commit": "022521a8910a5543b0251b21c9e1a1e989745796" },
"blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" },
"blueprints": { "branch": "main", "commit": "e5825c30464f98e77e8b5ffb88d59fd98df6c802" },
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
"conform.nvim": { "branch": "master", "commit": "363243c03102a531a8203311d4f2ae704c620d9b" },
"conform.nvim": { "branch": "master", "commit": "b4aab989db276993ea5dcb78872be494ce546521" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
"gitsigns.nvim": { "branch": "main", "commit": "d8918f06624dd53b9a82bd0e29c31bcfd541b40d" },
"gruvbox-material.nvim": { "branch": "master", "commit": "5de287d8fff70ee73a706c3c95a82f2060741b3e" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
"gitsigns.nvim": { "branch": "main", "commit": "f780609807eca1f783a36a8a31c30a48fbe150c5" },
"gruvbox.nvim": { "branch": "main", "commit": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437" },
"indent-blankline.nvim": { "branch": "master", "commit": "e10626f7fcd51ccd56d7ffc00883ba7e0aa28f78" },
"lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" },
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" },
"mini.clue": { "branch": "main", "commit": "2d361459de6a5fd7ea20a14ee4b95c6caec383b9" },
"mini.icons": { "branch": "main", "commit": "910db5df9724d65371182948f921fce23c2c881e" },
"monkey-alert": { "branch": "main", "commit": "213a39f8161f80ce43e1a164a54fe796432422b8" },
"neo-tree.nvim": { "branch": "main", "commit": "521bb4253b1adc2a1ff6c584bc839eba9bc99c0b" },
"no-neck-pain.nvim": { "branch": "main", "commit": "860462dd8b3d36861a81724a7b473db279f673f2" },
"noice.nvim": { "branch": "main", "commit": "eaed6cc9c06aa2013b5255349e4f26a6b17ab70f" },
"nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" },
"mini.icons": { "branch": "main", "commit": "f9a177c11daa7829389b7b6eaaec8b8a5c47052d" },
"neo-tree.nvim": { "branch": "main", "commit": "ed057048a281b418d5318dd5153f9486daa517a3" },
"no-neck-pain.nvim": { "branch": "main", "commit": "76ccd195fb2195ae1b9b9f0d539c517fa3f8a2b9" },
"noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-scrollbar": { "branch": "main", "commit": "5b103ef0fd2e8b9b4be3878ed38d224522192c6c" },
"nvim-spectre": { "branch": "master", "commit": "72f56f7585903cd7bf92c665351aa585e150af0f" },
"nvim-treesitter": { "branch": "master", "commit": "d34e62afd3e483fe0fa2f24b6323f3bb1d35ddcc" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-treesitter-context": { "branch": "master", "commit": "41847d3dafb5004464708a3db06b14f12bde548a" },
"nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" },
"nvim-web-devicons": { "branch": "master", "commit": "37334adf4517fecfd97c0b44e1d4718e377e9e52" },
"nvim-window-picker": { "branch": "main", "commit": "0dfef64eaf063e1cd27983ab11a30e7bc5b74fac" },
"peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" },
"plenary.nvim": { "branch": "master", "commit": "3707cdb1e43f5cea73afb6037e6494e7ce847a66" },
"replacer.nvim": { "branch": "master", "commit": "32e1713230844fa52f7f0598c59295de3c90dc95" },
"smear-cursor.nvim": { "branch": "main", "commit": "aff844fc1483fd673f721a41affcd7e2fcb885f5" },
"nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" },
"nvim-web-devicons": { "branch": "master", "commit": "6e51ca170563330e063720449c21f43e27ca0bc1" },
"nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"smear-cursor.nvim": { "branch": "main", "commit": "4b86df8a0c5f46e708616b21a02493bb0e47ecbd" },
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "dae2eac9d91464448b584c7949a31df8faefec56" },
"telescope-git-file-history.nvim": { "branch": "master", "commit": "c27d99ba88ec5f0b6d2b9f9bc67dd3d14c610b25" },
"telescope.nvim": { "branch": "master", "commit": "415af52339215926d705cccc08145f3782c4d132" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
"telescope-git-file-history.nvim": { "branch": "master", "commit": "e7d495319f2a04df96402057a6992ea970f8914d" },
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
"trouble.nvim": { "branch": "main", "commit": "50481f414bd3c1a40122c1d759d7e424d5fafe84" },
"vim-fugitive": { "branch": "master", "commit": "d74a7cff4cfcf84f83cc7eccfa365488f3bbabc2" }
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
"undotree": { "branch": "master", "commit": "0f1c9816975b5d7f87d5003a19c53c6fd2ff6f7f" },
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" }
}

View File

@@ -320,9 +320,7 @@ map("n", "<leader>w-", "<C-W>s", { desc = "Split Window Below", remap = true })
map("n", "<leader>w|", "<C-W>v", { desc = "Split Window Right", remap = true })
map("n", "<leader>-", "<C-W>s", { desc = "Split Window Below", remap = true })
map("n", "<leader>|", "<C-W>v", { desc = "Split Window Right", remap = true })
map("n", "<leader>wm", function()
LazyVim.toggle.maximize()
end, { desc = "Maximize Toggle" })
map("n", "<leader>m", "<cmd>NoNeckPain<cr>", { desc = "Toggle centered layout" })
-- Move to window using the <ctrl> hjkl keys
map("n", "<C-h>", "<C-w>h", { desc = "Go to Left Window", remap = true })

View File

@@ -16,16 +16,16 @@ return {
{ "tpope/vim-fugitive" },
{
-- dir = "~/Documents/Code/monkey-alert.nvim",
"dqnid/monkey-alert.nvim",
name = "monkey-alert",
opts = {
monkey_mail_list = require("config.monkeylist"),
blame_text_color_hex = "#c0ffee",
blame_text = "- Monkey alert 🐒",
blame_position = "eol",
auto_attach = false,
},
},
-- {
-- -- dir = "~/Documents/Code/monkey-alert.nvim",
-- "dqnid/monkey-alert.nvim",
-- name = "monkey-alert",
-- opts = {
-- monkey_mail_list = require("config.monkeylist"),
-- blame_text_color_hex = "#c0ffee",
-- blame_text = "- Monkey alert 🐒",
-- blame_position = "eol",
-- auto_attach = false,
-- },
-- },
}

View File

@@ -0,0 +1,67 @@
return {
-- Saving / restoring
enabled = true, -- Enables/disables auto creating, saving and restoring
auto_save = true, -- Enables/disables auto saving session on exit
auto_restore = false, -- Enables/disables auto restoring session on start
auto_create = true, -- Enables/disables auto creating new session files. Can be a function that returns true if a new session file should be allowed
auto_restore_last_session = false, -- On startup, loads the last saved session if session for cwd does not exist
cwd_change_handling = false, -- Automatically save/restore sessions when changing directories
single_session_mode = false, -- Enable single session mode to keep all work in one session regardless of cwd changes. When enabled, prevents creation of separate sessions for different directories and maintains one unified session. Does not work with cwd_change_handling
-- Filtering
suppressed_dirs = nil, -- Suppress session restore/create in certain directories
allowed_dirs = nil, -- Allow session restore/create in certain directories
bypass_save_filetypes = nil, -- List of filetypes to bypass auto save when the only buffer open is one of the file types listed, useful to ignore dashboards
close_filetypes_on_save = { "checkhealth" }, -- Buffers with matching filetypes will be closed before saving
close_unsupported_windows = true, -- Close windows that aren't backed by normal file before autosaving a session
preserve_buffer_on_restore = nil, -- Function that returns true if a buffer should be preserved when restoring a session
-- Git / Session naming
git_use_branch_name = false, -- Include git branch name in session name, can also be a function that takes an optional path and returns the name of the branch
git_auto_restore_on_branch_change = false, -- Should we auto-restore the session when the git branch changes. Requires git_use_branch_name
custom_session_tag = nil, -- Function that can return a string to be used as part of the session name
-- Deleting
auto_delete_empty_sessions = true, -- Enables/disables deleting the session if there are only unnamed/empty buffers when auto-saving
purge_after_minutes = nil, -- Sessions older than purge_after_minutes will be deleted asynchronously on startup, e.g. set to 14400 to delete sessions that haven't been accessed for more than 10 days, defaults to off (no purging), requires >= nvim 0.10
-- Saving extra data
save_extra_data = nil, -- Function that returns extra data that should be saved with the session. Will be passed to restore_extra_data on restore
restore_extra_data = nil, -- Function called when there's extra data saved for a session
-- Argument handling
args_allow_single_directory = true, -- Follow normal session save/load logic if launched with a single directory as the only argument
args_allow_files_auto_save = false, -- Allow saving a session even when launched with a file argument (or multiple files/dirs). It does not load any existing session first. Can be true or a function that returns true when saving is allowed. See documentation for more detail
-- Misc
log_level = "error", -- Sets the log level of the plugin (debug, info, warn, error).
root_dir = vim.fn.stdpath("data") .. "/sessions/", -- Root dir where sessions will be stored
show_auto_restore_notif = false, -- Whether to show a notification when auto-restoring
restore_error_handler = nil, -- Function called when there's an error restoring. By default, it ignores fold and help errors otherwise it displays the error and returns false to disable auto_save. Default handler is accessible as require('auto-session').default_restore_error_handler
continue_restore_on_error = true, -- Keep loading the session even if there's an error
lsp_stop_on_restore = false, -- Should language servers be stopped when restoring a session. Can also be a function that will be called if set. Not called on autorestore from startup
lazy_support = true, -- Automatically detect if Lazy.nvim is being used and wait until Lazy is done to make sure session is restored correctly. Does nothing if Lazy isn't being used
legacy_cmds = true, -- Define legacy commands: Session*, Autosession (lowercase s), currently true. Set to false to prevent defining them
---@type SessionLens
session_lens = {
picker = nil, -- "telescope"|"snacks"|"fzf"|"select"|nil Pickers are detected automatically but you can also set one manually. Falls back to vim.ui.select
load_on_setup = true, -- Only used for telescope, registers the telescope extension at startup so you can use :Telescope session-lens
picker_opts = nil, -- Table passed to Telescope / Snacks / Fzf-Lua to configure the picker. See below for more information
previewer = "summary", -- 'summary'|'active_buffer'|function - How to display session preview. 'summary' shows a summary of the session, 'active_buffer' shows the contents of the active buffer in the session, or a custom function
---@type SessionLensMappings
mappings = {
-- Mode can be a string or a table, e.g. {"i", "n"} for both insert and normal mode
delete_session = { "i", "<C-d>" }, -- mode and key for deleting a session from the picker
alternate_session = { "i", "<C-s>" }, -- mode and key for swapping to alternate session from the picker
copy_session = { "i", "<C-y>" }, -- mode and key for copying a session from the picker
},
---@type SessionControl
session_control = {
control_dir = vim.fn.stdpath("data") .. "/auto_session/", -- Auto session control dir, for control files, like alternating between two sessions with session-lens
control_filename = "session_control.json", -- File name of the session control file
},
},
}

View File

@@ -1,12 +1,12 @@
return {
{
"toppair/peek.nvim",
event = { "VeryLazy" },
build = "deno task --quiet build:fast",
config = function()
require("peek").setup()
vim.api.nvim_create_user_command("PeekOpen", require("peek").open, {})
vim.api.nvim_create_user_command("PeekClose", require("peek").close, {})
end,
},
-- {
-- "toppair/peek.nvim",
-- event = { "VeryLazy" },
-- build = "deno task --quiet build:fast",
-- config = function()
-- require("peek").setup()
-- vim.api.nvim_create_user_command("PeekOpen", require("peek").open, {})
-- vim.api.nvim_create_user_command("PeekClose", require("peek").close, {})
-- end,
-- },
}

View File

@@ -17,7 +17,7 @@ local config = {
statuscolumn = { enabled = true },
words = { enabled = true },
},
}
},
}
return config

View File

@@ -29,20 +29,5 @@ return {
end
end,
},
-- Multi buffer search
{
"nvim-pack/nvim-spectre",
},
-- Multi buffer search + replace
{
'gabrielpoca/replacer.nvim',
opts = { rename_files = false },
keys = {
{
'<leader>h',
function() require('replacer').run() end,
desc = "run replacer.nvim"
}
}
}
{ 'mbbill/undotree' }
}

View File

@@ -68,7 +68,7 @@ return {
opts = {
smear_between_buffers = false,
smear_between_neighbor_lines = true,
scroll_buffer_space = true,
scroll_buffer_space = false,
-- Set to `true` if your font supports legacy computing symbols (block unicode symbols).
legacy_computing_symbols_support = false,
smear_insert_mode = true,