Created
September 24, 2022 03:56
-
-
Save hrsh7th/e327907d57756d54f22f80d0fd03ef64 to your computer and use it in GitHub Desktop.
cmp-toggle example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local cmp = require('cmp') | |
vim.api.nvim_create_user_command('CmpToggle', function() | |
local config = cmp.get_config() | |
if config.enabled == false then | |
cmp.setup { enabled = require('cmp.config.default')().enabled } | |
else | |
cmp.setup { enabled = false } | |
end | |
end, {}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment