chore: use lua API for autocmd (#43)

This commit is contained in:
numToStr 2022-10-29 12:32:52 +05:30 committed by GitHub
parent 3cf38d9c95
commit 78924d1d67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 6 deletions

View File

@ -7,12 +7,11 @@ M.client_source_map = {}
---Setup cmp-nvim-lsp source.
M.setup = function()
vim.cmd([[
augroup cmp_nvim_lsp
autocmd!
autocmd InsertEnter * lua require'cmp_nvim_lsp'._on_insert_enter()
augroup END
]])
vim.api.nvim_create_autocmd('InsertEnter', {
group = vim.api.nvim_create_augroup('cmp_nvim_lsp', { clear = true }),
pattern = '*',
callback = M._on_insert_enter
})
end
local if_nil = function(val, default)