From 9d64fb87167f2f2c5d80295c34db0a409e81a890 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sat, 11 Jan 2025 21:04:16 +0100 Subject: [PATCH] luasnip: only add cmp source if cmp enabled --- modules/plugins/snippets/luasnip/config.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/snippets/luasnip/config.nix b/modules/plugins/snippets/luasnip/config.nix index 927b21fd..92bcfbec 100644 --- a/modules/plugins/snippets/luasnip/config.nix +++ b/modules/plugins/snippets/luasnip/config.nix @@ -17,7 +17,7 @@ in { }; }; startPlugins = cfg.providers; - autocomplete.nvim-cmp = { + autocomplete.nvim-cmp = mkIf config.vim.autocomplete.nvim-cmp.enable { sources = {luasnip = "[LuaSnip]";}; sourcePlugins = ["cmp-luasnip"]; };