mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-23 13:50:44 +00:00
27 lines
470 B
Nix
27 lines
470 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
inherit (lib.modules) mkIf;
|
|
|
|
cfg = config.vim.snippets.luasnip;
|
|
in {
|
|
config = mkIf cfg.enable {
|
|
vim = {
|
|
lazy.plugins = {
|
|
luasnip = {
|
|
package = "luasnip";
|
|
lazy = true;
|
|
after = cfg.loaders;
|
|
};
|
|
};
|
|
startPlugins = cfg.providers;
|
|
autocomplete.nvim-cmp = {
|
|
sources = {luasnip = "[LuaSnip]";};
|
|
sourcePlugins = ["cmp-luasnip"];
|
|
};
|
|
};
|
|
};
|
|
}
|