Skip to content

Commit

Permalink
lib/plugins: deprecate neovim-plugin & vim-plugin aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
MattSturgeon committed Dec 22, 2024
1 parent 43a3171 commit 214731d
Showing 1 changed file with 22 additions and 15 deletions.
37 changes: 22 additions & 15 deletions lib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,6 @@ lib.makeExtensible (
plugins = call ./plugins { };
utils = call ./utils.nix { inherit _nixvimTests; };

# plugin aliases
neovim-plugin = {
inherit (self.plugins.neovim)
extraOptionsOptions
mkNeovimPlugin
;
};
vim-plugin = {
inherit (self.plugins.vim)
mkSettingsOption
mkSettingsOptionDescription
mkVimPlugin
;
};

# Top-level helper aliases:
# TODO: deprecate some aliases

Expand Down Expand Up @@ -120,4 +105,26 @@ lib.makeExtensible (
maintainers = "lib.maintainers";
nixvimTypes = "lib.types";
}
//
# TODO: neovim-plugin & vim-plugin aliases deprecated 2024-12-22; internal functions
lib.mapAttrs'
(scope: names: {
name = "${scope}-plugin";
value = lib.genAttrs names (
name:
lib.warn "`${scope}-plugin.${name}` has been moved to `plugins.${scope}.${name}`."
self.plugins.${scope}.${name}
);
})
{
neovim = [
"extraOptionsOptions"
"mkNeovimPlugin"
];
vim = [
"mkSettingsOption"
"mkSettingsOptionDescription"
"mkVimPlugin"
];
}
)

0 comments on commit 214731d

Please sign in to comment.