diff --git a/lib/default.nix b/lib/default.nix index ad41994c..47079086 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -20,10 +20,24 @@ lib.makeExtensible ( keymaps = call ./keymap-helpers.nix { }; lua = call ./to-lua.nix { }; modules = call ./modules.nix { inherit flake; }; - neovim-plugin = call ./neovim-plugin.nix { }; options = call ./options.nix { }; + plugins = call ./plugins { }; utils = call ./utils.nix { inherit _nixvimTests; }; - vim-plugin = call ./vim-plugin.nix { }; + + # plugin aliases + neovim-plugin = { + inherit (self.plugins) + extraOptionsOptions + mkNeovimPlugin + ; + }; + vim-plugin = { + inherit (self.plugins) + mkSettingsOption + mkSettingsOptionDescription + mkVimPlugin + ; + }; # Top-level helper aliases: # TODO: deprecate some aliases diff --git a/lib/plugins/default.nix b/lib/plugins/default.nix new file mode 100644 index 00000000..63a63d4d --- /dev/null +++ b/lib/plugins/default.nix @@ -0,0 +1,12 @@ +{ call }: +let + neovim = call ./neovim.nix { }; + vim = call ./vim.nix { }; +in +# TODO: be a bit more deliberate +# NOTE: remove the overridable stuff from `call`; +# I don't want to think about how (a // b) interacts with them yet +builtins.removeAttrs (neovim // vim) [ + "override" + "overrideDerivation" +] diff --git a/lib/neovim-plugin.nix b/lib/plugins/neovim.nix similarity index 100% rename from lib/neovim-plugin.nix rename to lib/plugins/neovim.nix diff --git a/lib/vim-plugin.nix b/lib/plugins/vim.nix similarity index 100% rename from lib/vim-plugin.nix rename to lib/plugins/vim.nix