feat: apply new module format to snippet plugins

This commit is contained in:
NotAShelf 2023-02-27 22:28:06 +03:00
parent 97899667db
commit d5082e5ef2
No known key found for this signature in database
GPG key ID: 5B5C8895F28445F1
4 changed files with 21 additions and 11 deletions

View file

@ -1,10 +1,5 @@
{
pkgs,
lib,
config,
...
}: {
_: {
imports = [
./vsnip.nix
./vsnip
];
}

View file

@ -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"];
};
}

View file

@ -0,0 +1,5 @@
_: {
imports = [
./vsnip.nix
];
}

View file

@ -11,8 +11,4 @@ in {
options.vim.snippets.vsnip = {
enable = mkEnableOption "Enable vim-vsnip";
};
config = mkIf cfg.enable {
vim.startPlugins = ["vim-vsnip"];
};
}