diff --git a/modules/snippets/default.nix b/modules/snippets/default.nix index dd88e3c6..cde3f7c5 100644 --- a/modules/snippets/default.nix +++ b/modules/snippets/default.nix @@ -1,10 +1,5 @@ -{ - pkgs, - lib, - config, - ... -}: { +_: { imports = [ - ./vsnip.nix + ./vsnip ]; } diff --git a/modules/snippets/vsnip/config.nix b/modules/snippets/vsnip/config.nix new file mode 100644 index 00000000..b1753280 --- /dev/null +++ b/modules/snippets/vsnip/config.nix @@ -0,0 +1,14 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; +with builtins; let + cfg = config.vim.snippets.vsnip; +in { + config = mkIf cfg.enable { + vim.startPlugins = ["vim-vsnip"]; + }; +} diff --git a/modules/snippets/vsnip/default.nix b/modules/snippets/vsnip/default.nix new file mode 100644 index 00000000..fee36eba --- /dev/null +++ b/modules/snippets/vsnip/default.nix @@ -0,0 +1,5 @@ +_: { + imports = [ + ./vsnip.nix + ]; +} diff --git a/modules/snippets/vsnip.nix b/modules/snippets/vsnip/vsnip.nix similarity index 72% rename from modules/snippets/vsnip.nix rename to modules/snippets/vsnip/vsnip.nix index 671671c8..1049651d 100644 --- a/modules/snippets/vsnip.nix +++ b/modules/snippets/vsnip/vsnip.nix @@ -11,8 +11,4 @@ in { options.vim.snippets.vsnip = { enable = mkEnableOption "Enable vim-vsnip"; }; - - config = mkIf cfg.enable { - vim.startPlugins = ["vim-vsnip"]; - }; }