From 1d777e68c7a206459b3543b1f477db9385a3affb Mon Sep 17 00:00:00 2001 From: krolyxon Date: Wed, 25 Jan 2023 23:51:22 +0530 Subject: [PATCH] fix crates.nvim breaking cmp --- lua/plugins/init.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index e8b2588..44426af 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -99,11 +99,8 @@ local plugins = { event = { "BufRead Cargo.toml" }, config = function() require("plugins.configs.others").crates() - end, - -- Add crates.nvim to the cmp sources as soon as we load the plugin - init = function() - local cmp = require("cmp"); - cmp.setup.buffer({ sources = { { name = "crates" } } }) + -- Add crates.nvim to the cmp sources as soon as we load the plugin + require("cmp").setup.buffer({ sources = { { name = "crates" } } }) end, },