plugins/friendly-snippets: init

This commit is contained in:
Gaetan Lepage 2024-01-22 11:25:52 +01:00 committed by Gaétan Lepage
parent be2ed580e8
commit 86d6ce5029
3 changed files with 34 additions and 0 deletions

View file

@ -0,0 +1,25 @@
{
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 = helpers.mkPackageOption "friendly-snippets" pkgs.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 = [{}];
};
}