diff --git a/modules/snippets/default.nix b/modules/snippets/default.nix index dd88e3c..cde3f7c 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 0000000..b175328 --- /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 0000000..fee36eb --- /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 671671c..1049651 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"]; - }; }