luasnip: lazy load

This commit is contained in:
Ching Pei Yang 2024-10-21 18:42:02 +02:00
parent 46a1f0427f
commit e829a0964a
No known key found for this signature in database
GPG key ID: 062FBBCE1D0C5DD9

View file

@ -9,9 +9,19 @@
in {
config = mkIf cfg.enable {
vim = {
startPlugins = ["luasnip" "cmp-luasnip"] ++ cfg.providers;
lazy.plugins = {
luasnip = {
package = "luasnip";
lazy = true;
after = cfg.loaders;
};
cmp-luasnip = mkIf config.vim.autocomplete.nvim-cmp.enable {
package = "cmp-luasnip";
lazy = true;
};
};
startPlugins = cfg.providers;
autocomplete.nvim-cmp.sources = {luasnip = "[LuaSnip]";};
pluginRC.luasnip = cfg.loaders;
};
};
}