Skip to content

Commit abc17ed

Browse files
committed
plugins/deprecation: allow renaming/removing different plugin scopes
1 parent cb33b76 commit abc17ed

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

plugins/deprecation.nix

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ let
77
It is recommended to use `rustaceanvim` instead.
88
'';
99
};
10-
removed = {
10+
removed.plugins = {
1111
# Added 2023-08-29
1212
treesitter-playground = ''
1313
The `treesitter-playground` plugin has been deprecated since the functionality is included in Neovim.
@@ -23,7 +23,7 @@ let
2323
It is recommended to use `plugins.pckr` or `plugins.lazy` instead.
2424
'';
2525
};
26-
renamed = {
26+
renamed.plugins = {
2727
# Added 2024-09-17
2828
surround = "vim-surround";
2929
};
@@ -46,18 +46,8 @@ in
4646
{
4747

4848
imports =
49-
(lib.mapAttrsToList (
50-
name:
51-
lib.mkRemovedOptionModule [
52-
"plugins"
53-
name
54-
]
55-
) removed)
56-
++ (lib.mapAttrsToList (
57-
old: new: lib.mkRenamedOptionModule [ "plugins" old ] [ "plugins" new ]
58-
) renamed)
5949
# TODO: introduced 2025-04-19
60-
++ [
50+
[
6151
(lib.mkRenamedOptionModule
6252
[ "plugins" "codeium-nvim" "enable" ]
6353
[ "plugins" "windsurf-nvim" "enable" ]
@@ -67,6 +57,14 @@ in
6757
[ "plugins" "windsurf-vim" "enable" ]
6858
)
6959
]
60+
++ lib.foldlAttrs (
61+
acc: scope: removed':
62+
acc ++ lib.mapAttrsToList (name: msg: lib.mkRemovedOptionModule [ scope name ] msg) removed'
63+
) [ ] removed
64+
++ lib.foldlAttrs (
65+
acc: scope: renamed':
66+
acc ++ lib.mapAttrsToList (old: new: lib.mkRenamedOptionModule [ scope old ] [ scope new ]) renamed'
67+
) [ ] renamed
7068
++ builtins.map (
7169
name:
7270
lib.mkRemovedOptionModule [ "plugins" name "iconsPackage" ] ''

0 commit comments

Comments
 (0)