From 45fba7f0d1baa3e0c1ff29f9416a69ad05370d76 Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Thu, 19 Jun 2025 16:25:11 +0200 Subject: [PATCH] Modules/Neovim: Replace bbye with Snacks.bufdelete --- home/modules/neovim/default.nix | 26 ++++++++++++++++++-------- home/modules/neovim/mappings.nix | 8 +------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/home/modules/neovim/default.nix b/home/modules/neovim/default.nix index f71c428e..166f7c2b 100644 --- a/home/modules/neovim/default.nix +++ b/home/modules/neovim/default.nix @@ -272,13 +272,6 @@ in { }; }; - bbye = { - name = "vim-bbye"; - pkg = pkgs.vimPlugins.vim-bbye; - lazy = true; - cmd = ["Bdelete" "Bwipeout"]; - }; - better-escape = rec { name = "better_escape"; pkg = pkgs.vimPlugins.better-escape-nvim; @@ -1565,6 +1558,23 @@ in { lazy = false; }; + snacks = rec { + name = "snacks"; + pkg = pkgs.vimPlugins.snacks-nvim; + lazy = false; + priority = 1000; + config = mkDefaultConfig name; + opts = { + # Disables slow stuff in big files + bigfile = { + enabled = true; + notify = true; + size = 1.5 * 1024 * 1024; # 1.5MB + line_length = 1000; + }; + }; + }; + tabby = rec { name = "tabby"; pkg = pkgs.vimPlugins.tabby-nvim; @@ -2086,7 +2096,6 @@ in { in [ autopairs # Automatic closing brackets/parens # NOTE: For now replaced by blink - bbye # Delete buffer without closing the window or split better-escape # Escape to normal mode using "jk" catppuccin # Colortheme (also add this here to access palettes) cellular-automaton # Procrastinate better by watching animations @@ -2145,6 +2154,7 @@ in { sleuth # Heuristically set indent depth # TODO: See intellitab + snacks # Lots of QoL tabby # Nicer tabline (only showing tabpages) telescope # Option picker frontend todo-comments # Highlight TODOs diff --git a/home/modules/neovim/mappings.nix b/home/modules/neovim/mappings.nix index f31dba32..082234a1 100644 --- a/home/modules/neovim/mappings.nix +++ b/home/modules/neovim/mappings.nix @@ -556,15 +556,9 @@ { mode = "n"; key = "bd"; - action = "Bdelete"; + action = "lua Snacks.bufdelete()"; options.desc = "Close Buffer"; } - { - mode = "n"; - key = "bD"; - action = "Bdelete!"; - options.desc = "Force Close Buffer"; - } ]; leader-tabs = [