From 5fe755637f6ec5da5fea158398c458482f73d1b0 Mon Sep 17 00:00:00 2001 From: antoine Date: Sat, 18 Apr 2026 10:30:18 +0200 Subject: [PATCH 1/5] fix: remove dashboard startup section (no lazy.nvim) --- plugins/snacks.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/snacks.nix b/plugins/snacks.nix index e316619..7846e06 100644 --- a/plugins/snacks.nix +++ b/plugins/snacks.nix @@ -11,7 +11,6 @@ sections = [ {section = "header";} {section = "keys"; gap = 1; padding = 1;} - {section = "startup";} ]; preset.keys = [ {icon = " "; key = "e"; action = ":ene | startinsert"; desc = "New file";} From 4d46c4bcbe629f85534f8196545041ceeb9e20c4 Mon Sep 17 00:00:00 2001 From: antoine Date: Sat, 18 Apr 2026 10:52:46 +0200 Subject: [PATCH 2/5] feat: replace nvim-autopairs, oil.nvim, indent-blankline with mini equivalents --- plugins/editing.nix | 2 +- plugins/navigation.nix | 10 +++------- plugins/ui.nix | 4 ++-- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/plugins/editing.nix b/plugins/editing.nix index c416a0f..e57913d 100644 --- a/plugins/editing.nix +++ b/plugins/editing.nix @@ -1,6 +1,6 @@ {pkgs, ...}: { vim = { - autopairs.nvim-autopairs.enable = true; + mini.pairs.enable = true; comments.comment-nvim.enable = true; extraPlugins = with pkgs.vimPlugins; { diff --git a/plugins/navigation.nix b/plugins/navigation.nix index def8fb3..e50d42f 100644 --- a/plugins/navigation.nix +++ b/plugins/navigation.nix @@ -5,10 +5,6 @@ package = harpoon2; setup = ''require("harpoon"):setup()''; }; - oil-nvim = { - package = oil-nvim; - setup = ''require("oil").setup({})''; - }; }; fzf-lua = { @@ -30,9 +26,9 @@ {key = "3"; mode = ["n"]; lua = true; action = ''function() require("harpoon"):list():select(3) end''; desc = "Harpoon file 3";} {key = "4"; mode = ["n"]; lua = true; action = ''function() require("harpoon"):list():select(4) end''; desc = "Harpoon file 4";} - # Oil - {key = "-"; mode = ["n"]; lua = true; action = ''function() require("oil").open() end''; desc = "Open parent directory";} - {key = "-"; mode = ["n"]; lua = true; action = ''function() require("oil").open_float() end''; desc = "Open parent directory (float)";} + # Mini.files + {key = "-"; mode = ["n"]; lua = true; action = ''function() MiniFiles.open() end''; desc = "Open file explorer";} + {key = "-"; mode = ["n"]; lua = true; action = ''function() MiniFiles.open(vim.api.nvim_buf_get_name(0)) end''; desc = "Open file explorer (current file)";} # FZF-lua {key = "ff"; mode = ["n"]; action = "FzfLua files"; desc = "Find Files";} diff --git a/plugins/ui.nix b/plugins/ui.nix index cebc981..7cb41a9 100644 --- a/plugins/ui.nix +++ b/plugins/ui.nix @@ -1,10 +1,10 @@ {...}: { vim = { - visuals.indent-blankline.enable = true; - mini = { icons.enable = true; surround.enable = true; + indentscope.enable = true; + files.enable = true; }; luaConfigRC.mini-icons-mock = '' From 49890805b0ead53b09438df1c004f5bc8d1e810f Mon Sep 17 00:00:00 2001 From: antoine Date: Sat, 18 Apr 2026 10:58:25 +0200 Subject: [PATCH 3/5] feat: replace fzf-lua with snacks.picker --- flake.nix | 2 +- plugins/lsp.nix | 4 ++-- plugins/navigation.nix | 16 ++++++---------- plugins/snacks.nix | 7 ++++--- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/flake.nix b/flake.nix index 8dd26ad..f82e19c 100644 --- a/flake.nix +++ b/flake.nix @@ -25,7 +25,7 @@ nativeBuildInputs = [pkgs.makeWrapper]; postBuild = '' wrapProgram $out/bin/nvim \ - --prefix PATH : ${pkgs.lib.makeBinPath [pkgs.git pkgs.fzf pkgs.lazygit]} + --prefix PATH : ${pkgs.lib.makeBinPath [pkgs.git pkgs.lazygit]} ''; }; }; diff --git a/plugins/lsp.nix b/plugins/lsp.nix index 5703359..f19e3a4 100644 --- a/plugins/lsp.nix +++ b/plugins/lsp.nix @@ -51,8 +51,8 @@ }; keymaps = [ - {key = "ls"; mode = ["n"]; action = "FzfLua lsp_document_symbols"; desc = "Document Symbols";} - {key = "lS"; mode = ["n"]; action = "FzfLua lsp_live_workspace_symbols"; desc = "Workspace Symbols";} + {key = "ls"; mode = ["n"]; lua = true; action = "function() Snacks.picker.lsp_symbols() end"; desc = "Document Symbols";} + {key = "lS"; mode = ["n"]; lua = true; action = "function() Snacks.picker.lsp_workspace_symbols() end"; desc = "Workspace Symbols";} {key = "la"; mode = ["n"]; lua = true; action = "function() vim.lsp.buf.code_action() end"; desc = "Code Actions";} {key = "K"; mode = ["n"]; lua = true; action = "function() vim.lsp.buf.hover() end"; desc = "Hover Docs";} {key = "lR"; mode = ["n"]; action = "LspRestart"; desc = "Restart LSP";} diff --git a/plugins/navigation.nix b/plugins/navigation.nix index e50d42f..0b36be1 100644 --- a/plugins/navigation.nix +++ b/plugins/navigation.nix @@ -7,10 +7,6 @@ }; }; - fzf-lua = { - enable = true; - profile = "telescope"; - }; session.nvim-session-manager = { enable = true; @@ -30,12 +26,12 @@ {key = "-"; mode = ["n"]; lua = true; action = ''function() MiniFiles.open() end''; desc = "Open file explorer";} {key = "-"; mode = ["n"]; lua = true; action = ''function() MiniFiles.open(vim.api.nvim_buf_get_name(0)) end''; desc = "Open file explorer (current file)";} - # FZF-lua - {key = "ff"; mode = ["n"]; action = "FzfLua files"; desc = "Find Files";} - {key = "fg"; mode = ["n"]; action = "FzfLua live_grep"; desc = "Live Grep";} - {key = "fb"; mode = ["n"]; action = "FzfLua buffers"; desc = "Buffer List";} - {key = "fh"; mode = ["n"]; action = "FzfLua help_tags"; desc = "Help Tags";} - {key = "fo"; mode = ["n"]; action = "FzfLua oldfiles"; desc = "Recent Files";} + # Snacks picker + {key = "ff"; mode = ["n"]; lua = true; action = "function() Snacks.picker.files() end"; desc = "Find Files";} + {key = "fg"; mode = ["n"]; lua = true; action = "function() Snacks.picker.grep() end"; desc = "Live Grep";} + {key = "fb"; mode = ["n"]; lua = true; action = "function() Snacks.picker.buffers() end"; desc = "Buffer List";} + {key = "fh"; mode = ["n"]; lua = true; action = "function() Snacks.picker.help() end"; desc = "Help Tags";} + {key = "fo"; mode = ["n"]; lua = true; action = "function() Snacks.picker.recent() end"; desc = "Recent Files";} {key = "fn"; mode = ["n"]; action = "Noice"; desc = "Notifications";} # Sessions diff --git a/plugins/snacks.nix b/plugins/snacks.nix index 7846e06..d66ba37 100644 --- a/plugins/snacks.nix +++ b/plugins/snacks.nix @@ -5,6 +5,7 @@ input.enable = true; lazygit.enable = true; rename.enable = true; + picker.enable = true; dashboard = { enable = true; @@ -14,9 +15,9 @@ ]; preset.keys = [ {icon = " "; key = "e"; action = ":ene | startinsert"; desc = "New file";} - {icon = " "; key = ",ff"; action = ":FzfLua files"; desc = "Find file";} - {icon = " "; key = ",fo"; action = ":FzfLua oldfiles"; desc = "Recently opened";} - {icon = " "; key = ",fg"; action = ":FzfLua live_grep"; desc = "Find word";} + {icon = " "; key = ",ff"; action = ":lua Snacks.picker.files()"; desc = "Find file";} + {icon = " "; key = ",fo"; action = ":lua Snacks.picker.recent()"; desc = "Recently opened";} + {icon = " "; key = ",fg"; action = ":lua Snacks.picker.grep()"; desc = "Find word";} {icon = " "; key = ",fp"; action = ":SessionManager load_session"; desc = "Open session";} {icon = " "; key = "q"; action = ":qa"; desc = "Quit";} ]; From 5dc158af550654a8d35422a14ac8d955db00a039 Mon Sep 17 00:00:00 2001 From: antoine Date: Sat, 18 Apr 2026 11:03:02 +0200 Subject: [PATCH 4/5] feat: remove vim-fugitive in favor of snacks lazygit --- plugins/git.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plugins/git.nix b/plugins/git.nix index 8526dd6..4bdbf33 100644 --- a/plugins/git.nix +++ b/plugins/git.nix @@ -1,6 +1,3 @@ {...}: { - vim.git = { - gitsigns.enable = true; - vim-fugitive.enable = true; - }; + vim.git.gitsigns.enable = true; } From 9c8ef716897cd82873ca7525eb8d319103914bd0 Mon Sep 17 00:00:00 2001 From: antoine Date: Sat, 18 Apr 2026 11:28:18 +0200 Subject: [PATCH 5/5] feat: blink.cmp, treesitter textobjects, snacks scroll, lsp cleanup --- config.nix | 1 + plugins/completion.nix | 35 ++++++++++------------------------- plugins/lsp.nix | 2 -- plugins/snacks.nix | 1 + plugins/treesitter.nix | 27 +++++++++++++++++++++++++++ 5 files changed, 39 insertions(+), 27 deletions(-) create mode 100644 plugins/treesitter.nix diff --git a/config.nix b/config.nix index e606821..cb63a39 100644 --- a/config.nix +++ b/config.nix @@ -4,6 +4,7 @@ ./plugins/theme.nix ./plugins/completion.nix ./plugins/lsp.nix + ./plugins/treesitter.nix ./plugins/formatter.nix ./plugins/statusline.nix ./plugins/git.nix diff --git a/plugins/completion.nix b/plugins/completion.nix index 1481df6..b5a4ad5 100644 --- a/plugins/completion.nix +++ b/plugins/completion.nix @@ -1,29 +1,14 @@ {...}: { - vim = { - autocomplete.nvim-cmp = { - enable = true; - mappings = { - complete = ""; - close = ""; - scrollDocsUp = ""; - scrollDocsDown = ""; - confirm = ""; - next = ""; - previous = ""; - }; + vim.autocomplete.blink-cmp = { + enable = true; + mappings = { + complete = ""; + close = ""; + scrollDocsUp = ""; + scrollDocsDown = ""; + confirm = ""; + next = ""; + previous = ""; }; - - snippets.luasnip.enable = true; - - luaConfigRC.luasnip-keymaps = '' - vim.keymap.set({"i", "s"}, "", function() - local ls = require("luasnip") - if ls.expand_or_jumpable() then ls.expand_or_jump() end - end, {silent = true}) - vim.keymap.set({"i", "s"}, "", function() - local ls = require("luasnip") - if ls.jumpable(-1) then ls.jump(-1) end - end, {silent = true}) - ''; }; } diff --git a/plugins/lsp.nix b/plugins/lsp.nix index f19e3a4..ea68bab 100644 --- a/plugins/lsp.nix +++ b/plugins/lsp.nix @@ -53,8 +53,6 @@ keymaps = [ {key = "ls"; mode = ["n"]; lua = true; action = "function() Snacks.picker.lsp_symbols() end"; desc = "Document Symbols";} {key = "lS"; mode = ["n"]; lua = true; action = "function() Snacks.picker.lsp_workspace_symbols() end"; desc = "Workspace Symbols";} - {key = "la"; mode = ["n"]; lua = true; action = "function() vim.lsp.buf.code_action() end"; desc = "Code Actions";} - {key = "K"; mode = ["n"]; lua = true; action = "function() vim.lsp.buf.hover() end"; desc = "Hover Docs";} {key = "lR"; mode = ["n"]; action = "LspRestart"; desc = "Restart LSP";} ]; }; diff --git a/plugins/snacks.nix b/plugins/snacks.nix index d66ba37..0481258 100644 --- a/plugins/snacks.nix +++ b/plugins/snacks.nix @@ -6,6 +6,7 @@ lazygit.enable = true; rename.enable = true; picker.enable = true; + scroll.enable = true; dashboard = { enable = true; diff --git a/plugins/treesitter.nix b/plugins/treesitter.nix new file mode 100644 index 0000000..8fddb0c --- /dev/null +++ b/plugins/treesitter.nix @@ -0,0 +1,27 @@ +{...}: { + vim.treesitter.textobjects = { + enable = true; + setupOpts = { + select = { + enable = true; + lookahead = true; + keymaps = { + "af" = "@function.outer"; + "if" = "@function.inner"; + "ac" = "@class.outer"; + "ic" = "@class.inner"; + "aa" = "@parameter.outer"; + "ia" = "@parameter.inner"; + }; + }; + move = { + enable = true; + set_jumps = true; + goto_next_start."]f" = "@function.outer"; + goto_previous_start."[f" = "@function.outer"; + goto_next_end."]F" = "@function.outer"; + goto_previous_end."[F" = "@function.outer"; + }; + }; + }; +}