plugins/friendly-snippets: switch to mkVimPlugin

This commit is contained in:
Gaetan Lepage 2024-12-15 20:18:07 +01:00 committed by nix-infra-bot
parent 93208b9536
commit 7e4f8a2a56
2 changed files with 4 additions and 23 deletions

View file

@ -1,31 +1,13 @@
{
lib,
helpers,
config,
pkgs,
...
}:
with lib;
let
cfg = config.plugins.friendly-snippets;
in
{
meta.maintainers = [ maintainers.GaetanLepage ];
lib.nixvim.vim-plugin.mkVimPlugin {
name = "friendly-snippets";
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 ];
maintainers = [ lib.maintainers.GaetanLepage ];
extraConfig = {
# Simply add an element to the `fromVscode` list to trigger the import of friendly-snippets
plugins.luasnip.fromVscode = [ { } ];
};