nix-community.nixvim/plugins/by-name/friendly-snippets/default.nix

33 lines
611 B
Nix
Raw Permalink Normal View History

2024-01-22 11:25:52 +01:00
{
lib,
helpers,
config,
pkgs,
...
}:
2024-05-05 19:39:35 +02:00
with lib;
let
2024-01-22 11:25:52 +01:00
cfg = config.plugins.friendly-snippets;
2024-05-05 19:39:35 +02:00
in
{
meta.maintainers = [ maintainers.GaetanLepage ];
2024-01-22 11:25:52 +01:00
options.plugins.friendly-snippets = {
enable = mkEnableOption "friendly-snippets";
package = lib.mkPackageOption pkgs "friendly-snippets" {
default = [
"vimPlugins"
"friendly-snippets"
];
};
2024-01-22 11:25:52 +01:00
};
config = mkIf cfg.enable {
2024-05-05 19:39:35 +02:00
extraPlugins = [ cfg.package ];
2024-01-22 11:25:52 +01:00
# Simply add an element to the `fromVscode` list to trigger the import of friendly-snippets
2024-05-05 19:39:35 +02:00
plugins.luasnip.fromVscode = [ { } ];
2024-01-22 11:25:52 +01:00
};
}