nixeovim/modules/plugins/snippet/luasnip.nix

24 lines
449 B
Nix

{ config, lib, pkgs, ... }:
let
cfg = config.plugins.snippet.luasnip;
in
{
options.plugins.snippet.luasnip = with lib; {
enable = mkEnableOption "luasnip";
package = mkPackageOption pkgs.vimPlugins "luasnip" { };
settings = mkOption {
type = types.attrs;
default = { };
};
};
config = lib.mkIf cfg.enable {
plugin.luasnip = {
inherit (cfg) package;
setupSettings = cfg.settings;
};
};
}