mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
[nvim] Prevent an error in the case of cmp absence
This commit is contained in:
parent
5450849ad7
commit
fc3493c594
1 changed files with 3 additions and 1 deletions
|
@ -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" })
|
||||
|
|
Loading…
Reference in a new issue