mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
List mkCmpSourcePlugin args directly in `sources/default.nix`, similar to LSP's language-servers list.
30 lines
537 B
Nix
30 lines
537 B
Nix
{
|
|
lib,
|
|
helpers,
|
|
config,
|
|
pkgs,
|
|
...
|
|
}:
|
|
{
|
|
pluginName,
|
|
sourceName,
|
|
defaultPackage ? pkgs.vimPlugins.${pluginName},
|
|
maintainers ? [ lib.maintainers.GaetanLepage ],
|
|
imports ? [ ],
|
|
...
|
|
}@args:
|
|
helpers.vim-plugin.mkVimPlugin config (
|
|
builtins.removeAttrs args [
|
|
"pluginName"
|
|
"sourceName"
|
|
]
|
|
// {
|
|
inherit defaultPackage maintainers;
|
|
name = pluginName;
|
|
|
|
imports = imports ++ [
|
|
# Register the source -> plugin name association
|
|
{ cmpSourcePlugins.${sourceName} = pluginName; }
|
|
];
|
|
}
|
|
)
|