luasnip: only add cmp source if cmp enabled

This commit is contained in:
Ching Pei Yang 2025-01-11 21:04:16 +01:00
parent 102d103986
commit 5a42eff8fd
No known key found for this signature in database
GPG key ID: B3841364253DC4C8

View file

@ -20,7 +20,7 @@ in {
after = cfg.loaders;
};
startPlugins = cfg.providers;
autocomplete.nvim-cmp = {
autocomplete.nvim-cmp = mkIf config.vim.autocomplete.nvim-cmp.enable {
sources = {luasnip = "[LuaSnip]";};
sourcePlugins = ["cmp-luasnip"];
};