plugins/snippets: move to by-name

This commit is contained in:
Matt Sturgeon 2024-09-05 02:41:27 +01:00
parent 2a91b89445
commit 82e7d153e4
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
7 changed files with 0 additions and 4 deletions

View file

@ -0,0 +1,32 @@
{
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 = [ { } ];
};
}