nix-community.nixvim/plugins/completion/cmp/sources/default.nix
Matt Sturgeon 3a8d4fee35
plugins/cmp: refactor source->plugin association
Introduce the internal option `cmpSourcePlugins` where plugins can
register their nvim-cmp source name association.
2024-06-30 18:22:59 +01:00

36 lines
593 B
Nix

{
lib,
config,
helpers,
pkgs,
...
}:
with lib;
let
cmpLib = import ../cmp-helpers.nix {
inherit
lib
config
helpers
pkgs
;
};
cmpSourcesPluginNames = import ../sources.nix;
pluginModules = mapAttrsToList (
sourceName: name: cmpLib.mkCmpSourcePlugin { inherit sourceName name; }
) cmpSourcesPluginNames;
in
{
# For extra cmp plugins
imports = [
./codeium-nvim.nix
./copilot-cmp.nix
./cmp-ai.nix
./cmp-fish.nix
./cmp-git.nix
./cmp-tabby.nix
./cmp-tabnine.nix
./crates-nvim.nix
] ++ pluginModules;
}