lazy load nvim-cmp if snippets are disabled
This commit is contained in:
parent
2a02054a39
commit
0349de6d10
|
@ -132,9 +132,12 @@ return packer.startup(function()
|
||||||
event = "InsertEnter",
|
event = "InsertEnter",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- cmp by default loads after friendly snippets
|
||||||
|
-- if snippets are disabled -> cmp loads on insertEnter!
|
||||||
use {
|
use {
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
disable = not plugin_settings.status.cmp,
|
disable = not plugin_settings.status.cmp,
|
||||||
|
event = plugin_settings.status.snippets and 'InsertEnter',
|
||||||
after = plugin_settings.status.snippets and "friendly-snippets",
|
after = plugin_settings.status.snippets and "friendly-snippets",
|
||||||
config = override_req("nvim_cmp", "plugins.configs.cmp", "setup"),
|
config = override_req("nvim_cmp", "plugins.configs.cmp", "setup"),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue