lazy load nvim-cmp if snippets are disabled

This commit is contained in:
siduck 2022-01-29 19:59:40 +05:30
parent 2a02054a39
commit 0349de6d10

View File

@ -132,9 +132,12 @@ return packer.startup(function()
event = "InsertEnter",
}
-- cmp by default loads after friendly snippets
-- if snippets are disabled -> cmp loads on insertEnter!
use {
"hrsh7th/nvim-cmp",
disable = not plugin_settings.status.cmp,
event = plugin_settings.status.snippets and 'InsertEnter',
after = plugin_settings.status.snippets and "friendly-snippets",
config = override_req("nvim_cmp", "plugins.configs.cmp", "setup"),
}