nix-community.nixvim/plugins/completion/cmp/cmp-helpers.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
539 B
Nix
Raw Normal View History

{
lib,
helpers,
config,
pkgs,
...
}:
with helpers.vim-plugin;
with lib;
{
mkCmpSourcePlugin =
{
name,
sourceName,
extraPlugins ? [ ],
useDefaultPackage ? true,
...
}:
mkVimPlugin config {
inherit name;
extraPlugins = extraPlugins ++ (lists.optional useDefaultPackage pkgs.vimPlugins.${name});
maintainers = [ maintainers.GaetanLepage ];
# Register the source -> plugin name association
imports = [ { cmpSourcePlugins.${sourceName} = name; } ];
};
}