[nvim] Prevent an error in the case of cmp absence

This commit is contained in:
Alyxia Sother 2022-01-18 16:08:48 +00:00
parent 5450849ad7
commit fc3493c594
No known key found for this signature in database
GPG Key ID: 355968D14144B739
1 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,7 @@
local neorg = require('neorg')
local cmp = require('cmp')
local ok, cmp = pcall(require, 'cmp')
if not ok then return end;
local cmp_config = cmp.get_config()
table.insert(cmp_config.sources, { name = "neorg" })