From e800122b45f5ec7f49de732cc89ed913eda7c47b Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 27 Aug 2021 15:32:33 +0530 Subject: [PATCH] plugins/configs/cmp: Enclose in pcall --- lua/plugins/configs/cmp.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 65b536c..6c1b7f3 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -1,6 +1,10 @@ -vim.opt.completeopt = "menuone,noselect" +local present, cmp = pcall(require, "cmp") -local cmp = require "cmp" +if not present then + return +end + +vim.opt.completeopt = "menuone,noselect" -- nvim-cmp setup cmp.setup {