Skip to content

Instantly share code, notes, and snippets.

@uga-rosa
Last active September 24, 2022 04:22
Show Gist options
  • Save uga-rosa/de897dead97e31241418e1f6f7795173 to your computer and use it in GitHub Desktop.
Save uga-rosa/de897dead97e31241418e1f6f7795173 to your computer and use it in GitHub Desktop.
local cmp_config
local function cmp_enable()
local ok, cmp = pcall(require, "cmp")
if ok then
cmp.setup({ enabled = cmp_config.enabled })
end
end
local function cmp_disable()
local ok, cmp = pcall(require, "cmp")
if ok then
cmp_config = cmp.get_config()
cmp.setup({ enabled = false })
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment