From edb0f18989eb499a34af185d75c4c84703e81c52 Mon Sep 17 00:00:00 2001 From: Drew Haven Date: Mon, 8 Dec 2025 16:06:55 -0800 Subject: [PATCH] [nvim] Updates a few plugins to new versions/repositories --- .../neovim/config/lua/plugins/disabled.lua | 4 +-- .../neovim/config/lua/plugins/mini.lua | 32 +++++++++++++++++-- .../neovim/config/lua/plugins/obsidian.lua | 17 +--------- .../neovim/config/lua/plugins/surround.lua | 32 ------------------- home-manager/features/neovim/default.nix | 1 + 5 files changed, 34 insertions(+), 52 deletions(-) delete mode 100644 home-manager/features/neovim/config/lua/plugins/surround.lua diff --git a/home-manager/features/neovim/config/lua/plugins/disabled.lua b/home-manager/features/neovim/config/lua/plugins/disabled.lua index dfc69d2..7ceca5b 100644 --- a/home-manager/features/neovim/config/lua/plugins/disabled.lua +++ b/home-manager/features/neovim/config/lua/plugins/disabled.lua @@ -1,5 +1,5 @@ return { -- Maeson installs it's own binaries that are incompatible with NixOS. - { "williamboman/mason.nvim", enabled = false }, - { "williamboman/mason-lspconfig.nvim", enabled = false }, + { "mason-org/mason.nvim", enabled = false }, + { "mason-org/mason-lspconfig.nvim", enabled = false }, } diff --git a/home-manager/features/neovim/config/lua/plugins/mini.lua b/home-manager/features/neovim/config/lua/plugins/mini.lua index e4e0518..f0dec2c 100644 --- a/home-manager/features/neovim/config/lua/plugins/mini.lua +++ b/home-manager/features/neovim/config/lua/plugins/mini.lua @@ -1,10 +1,38 @@ return { { - "echasnovski/mini.surround", + "nvim-mini/mini.surround", enable = true, + keys = function(_, keys) + -- Populate the keys based on the user's options + local opts = LazyVim.opts("mini.surround") + local mappings = { + { opts.mappings.add, desc = "Add Surrounding", mode = { "n", "v" } }, + { opts.mappings.delete, desc = "Delete Surrounding" }, + { opts.mappings.find, desc = "Find Right Surrounding" }, + { opts.mappings.find_left, desc = "Find Left Surrounding" }, + { opts.mappings.highlight, desc = "Highlight Surrounding" }, + { opts.mappings.replace, desc = "Replace Surrounding" }, + { opts.mappings.update_n_lines, desc = "Update `MiniSurround.config.n_lines`" }, + } + mappings = vim.tbl_filter(function(m) + return m[1] and #m[1] > 0 + end, mappings) + return vim.list_extend(mappings, keys) + end, + opts = { + mappings = { + add = "gsa", -- Add surrounding in Normal and Visual modes + delete = "gsd", -- Delete surrounding + find = "gsf", -- Find surrounding (to the right) + find_left = "gsF", -- Find surrounding (to the left) + highlight = "gsh", -- Highlight surrounding + replace = "gsr", -- Replace surrounding + update_n_lines = "gsn", -- Update `n_lines` + }, + }, }, { - "echasnovski/mini.comment", + "nvim-mini/mini.comment", enable = true, }, } diff --git a/home-manager/features/neovim/config/lua/plugins/obsidian.lua b/home-manager/features/neovim/config/lua/plugins/obsidian.lua index e059640..bbffe2b 100644 --- a/home-manager/features/neovim/config/lua/plugins/obsidian.lua +++ b/home-manager/features/neovim/config/lua/plugins/obsidian.lua @@ -1,22 +1,7 @@ return { - "epwalsh/obsidian.nvim", + "obsidian-nvim/obsidian.nvim", version = "*", -- recommended, use latest release instead of latest commit - lazy = true, ft = "markdown", - -- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault: - -- event = { - -- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'. - -- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/*.md" - -- -- refer to `:h file-pattern` for more examples - -- "BufReadPre path/to/my-vault/*.md", - -- "BufNewFile path/to/my-vault/*.md", - -- }, - dependencies = { - -- Required. - "nvim-lua/plenary.nvim", - -- For the picker - "nvim-telescope/telescope.nvim", - }, opts = { workspaces = { { diff --git a/home-manager/features/neovim/config/lua/plugins/surround.lua b/home-manager/features/neovim/config/lua/plugins/surround.lua deleted file mode 100644 index 36310ea..0000000 --- a/home-manager/features/neovim/config/lua/plugins/surround.lua +++ /dev/null @@ -1,32 +0,0 @@ --- https://www.lazyvim.org/extras/coding/mini-surround#minisurround -return { - "echasnovski/mini.surround", - keys = function(_, keys) - -- Populate the keys based on the user's options - local opts = LazyVim.opts("mini.surround") - local mappings = { - { opts.mappings.add, desc = "Add Surrounding", mode = { "n", "v" } }, - { opts.mappings.delete, desc = "Delete Surrounding" }, - { opts.mappings.find, desc = "Find Right Surrounding" }, - { opts.mappings.find_left, desc = "Find Left Surrounding" }, - { opts.mappings.highlight, desc = "Highlight Surrounding" }, - { opts.mappings.replace, desc = "Replace Surrounding" }, - { opts.mappings.update_n_lines, desc = "Update `MiniSurround.config.n_lines`" }, - } - mappings = vim.tbl_filter(function(m) - return m[1] and #m[1] > 0 - end, mappings) - return vim.list_extend(mappings, keys) - end, - opts = { - mappings = { - add = "gsa", -- Add surrounding in Normal and Visual modes - delete = "gsd", -- Delete surrounding - find = "gsf", -- Find surrounding (to the right) - find_left = "gsF", -- Find surrounding (to the left) - highlight = "gsh", -- Highlight surrounding - replace = "gsr", -- Replace surrounding - update_n_lines = "gsn", -- Update `n_lines` - }, - }, -} diff --git a/home-manager/features/neovim/default.nix b/home-manager/features/neovim/default.nix index e9d2707..a2c90f7 100644 --- a/home-manager/features/neovim/default.nix +++ b/home-manager/features/neovim/default.nix @@ -9,6 +9,7 @@ extraPackages = with pkgs; [ gcc # For treesitter complation + tree-sitter # For treesitter binaries ripgrep # Search support wayclip # Clipboard support fd # finder for telescope