From baa7dab63d33fb6f6078b2a53507cda3284da6df Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Tue, 15 Jul 2025 01:43:35 +0100 Subject: [PATCH 1/3] plugins/deprecation: reformat --- plugins/deprecation.nix | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/plugins/deprecation.nix b/plugins/deprecation.nix index 19784e53..0e0d2930 100644 --- a/plugins/deprecation.nix +++ b/plugins/deprecation.nix @@ -59,28 +59,12 @@ in # TODO: introduced 2025-04-19 ++ [ (lib.mkRenamedOptionModule - [ - "plugins" - "codeium-nvim" - "enable" - ] - [ - "plugins" - "windsurf-nvim" - "enable" - ] + [ "plugins" "codeium-nvim" "enable" ] + [ "plugins" "windsurf-nvim" "enable" ] ) (lib.mkRenamedOptionModule - [ - "plugins" - "codeium-vim" - "enable" - ] - [ - "plugins" - "windsurf-vim" - "enable" - ] + [ "plugins" "codeium-vim" "enable" ] + [ "plugins" "windsurf-vim" "enable" ] ) ] ++ builtins.map ( From d306bb0dbbeb3e8522c21683165eefc43b35d118 Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Tue, 15 Jul 2025 01:47:18 +0100 Subject: [PATCH 2/3] plugins/deprecation: allow renaming/removing different plugin scopes --- plugins/deprecation.nix | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/plugins/deprecation.nix b/plugins/deprecation.nix index 0e0d2930..d77974fe 100644 --- a/plugins/deprecation.nix +++ b/plugins/deprecation.nix @@ -7,7 +7,7 @@ let It is recommended to use `rustaceanvim` instead. ''; }; - removed = { + removed.plugins = { # Added 2023-08-29 treesitter-playground = '' The `treesitter-playground` plugin has been deprecated since the functionality is included in Neovim. @@ -23,7 +23,7 @@ let It is recommended to use `plugins.pckr` or `plugins.lazy` instead. ''; }; - renamed = { + renamed.plugins = { # Added 2024-09-17 surround = "vim-surround"; }; @@ -46,18 +46,8 @@ in { imports = - (lib.mapAttrsToList ( - name: - lib.mkRemovedOptionModule [ - "plugins" - name - ] - ) removed) - ++ (lib.mapAttrsToList ( - old: new: lib.mkRenamedOptionModule [ "plugins" old ] [ "plugins" new ] - ) renamed) # TODO: introduced 2025-04-19 - ++ [ + [ (lib.mkRenamedOptionModule [ "plugins" "codeium-nvim" "enable" ] [ "plugins" "windsurf-nvim" "enable" ] @@ -67,6 +57,14 @@ in [ "plugins" "windsurf-vim" "enable" ] ) ] + ++ lib.foldlAttrs ( + acc: scope: removed': + acc ++ lib.mapAttrsToList (name: msg: lib.mkRemovedOptionModule [ scope name ] msg) removed' + ) [ ] removed + ++ lib.foldlAttrs ( + acc: scope: renamed': + acc ++ lib.mapAttrsToList (old: new: lib.mkRenamedOptionModule [ scope old ] [ scope new ]) renamed' + ) [ ] renamed ++ builtins.map ( name: lib.mkRemovedOptionModule [ "plugins" name "iconsPackage" ] '' From 5a43670e7ee8a9cdc2da2fc489119ad05e62cca0 Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Tue, 15 Jul 2025 02:00:33 +0100 Subject: [PATCH 3/3] colorschemes/gruvbox-material: rename to gruvbox-material-nvim This will allow later adding a `gruvbox-material` plugin for the non-lua plugin. --- ...{gruvbox-material.nix => gruvbox-material-nvim.nix} | 10 ++++------ plugins/default.nix | 2 +- plugins/deprecation.nix | 6 ++++++ ...{gruvbox-material.nix => gruvbox-material-nvim.nix} | 6 +++--- 4 files changed, 14 insertions(+), 10 deletions(-) rename plugins/colorschemes/{gruvbox-material.nix => gruvbox-material-nvim.nix} (88%) rename tests/test-sources/plugins/colorschemes/{gruvbox-material.nix => gruvbox-material-nvim.nix} (91%) diff --git a/plugins/colorschemes/gruvbox-material.nix b/plugins/colorschemes/gruvbox-material-nvim.nix similarity index 88% rename from plugins/colorschemes/gruvbox-material.nix rename to plugins/colorschemes/gruvbox-material-nvim.nix index 3daac2f9..4abbb0d4 100644 --- a/plugins/colorschemes/gruvbox-material.nix +++ b/plugins/colorschemes/gruvbox-material-nvim.nix @@ -1,11 +1,9 @@ -{ - lib, - config, - ... -}: +{ lib, ... }: lib.nixvim.plugins.mkNeovimPlugin { - name = "gruvbox-material"; + name = "gruvbox-material-nvim"; isColorscheme = true; + colorscheme = "gruvbox-material"; + moduleName = "gruvbox-material"; packPathName = "gruvbox-material.nvim"; package = "gruvbox-material-nvim"; diff --git a/plugins/default.nix b/plugins/default.nix index f9eaf515..c1c118c6 100644 --- a/plugins/default.nix +++ b/plugins/default.nix @@ -12,7 +12,7 @@ ./colorschemes/everforest.nix ./colorschemes/github-theme.nix ./colorschemes/gruvbox.nix - ./colorschemes/gruvbox-material.nix + ./colorschemes/gruvbox-material-nvim.nix ./colorschemes/kanagawa.nix ./colorschemes/kanagawa-paper.nix ./colorschemes/melange.nix diff --git a/plugins/deprecation.nix b/plugins/deprecation.nix index d77974fe..76a74265 100644 --- a/plugins/deprecation.nix +++ b/plugins/deprecation.nix @@ -23,6 +23,12 @@ let It is recommended to use `plugins.pckr` or `plugins.lazy` instead. ''; }; + renamed.colorschemes = { + # Added 2025-07-15 + # NOTE: The old name is not in a stable version and was only in unstable for a few weeks, + # so we can remove this alias more quickly than usual. + gruvbox-material = "gruvbox-material-nvim"; + }; renamed.plugins = { # Added 2024-09-17 surround = "vim-surround"; diff --git a/tests/test-sources/plugins/colorschemes/gruvbox-material.nix b/tests/test-sources/plugins/colorschemes/gruvbox-material-nvim.nix similarity index 91% rename from tests/test-sources/plugins/colorschemes/gruvbox-material.nix rename to tests/test-sources/plugins/colorschemes/gruvbox-material-nvim.nix index d620fa48..ef158cf7 100644 --- a/tests/test-sources/plugins/colorschemes/gruvbox-material.nix +++ b/tests/test-sources/plugins/colorschemes/gruvbox-material-nvim.nix @@ -1,11 +1,11 @@ { lib, ... }: { empty = { - colorschemes.gruvbox-material.enable = true; + colorschemes.gruvbox-material-nvim.enable = true; }; defaults = { - colorschemes.gruvbox-material = { + colorschemes.gruvbox-material-nvim = { enable = true; settings = { @@ -31,7 +31,7 @@ }; example = { - colorschemes.gruvbox-material = { + colorschemes.gruvbox-material-nvim = { enable = true; settings = {