nix-community.nixvim/plugins/by-name/friendly-snippets/default.nix
2024-09-09 11:50:41 +01:00

32 lines
611 B
Nix

{
lib,
helpers,
config,
pkgs,
...
}:
with lib;
let
cfg = config.plugins.friendly-snippets;
in
{
meta.maintainers = [ maintainers.GaetanLepage ];
options.plugins.friendly-snippets = {
enable = mkEnableOption "friendly-snippets";
package = lib.mkPackageOption pkgs "friendly-snippets" {
default = [
"vimPlugins"
"friendly-snippets"
];
};
};
config = mkIf cfg.enable {
extraPlugins = [ cfg.package ];
# Simply add an element to the `fromVscode` list to trigger the import of friendly-snippets
plugins.luasnip.fromVscode = [ { } ];
};
}