feat(nvim): add lazy loading for cmp

This commit is contained in:
Moritz Böhme 2023-03-07 14:26:37 +01:00
parent 0556bfe81e
commit 2df38d379d
Signed by: moritz
GPG key ID: 970C6E89EB0547A9

View file

@ -48,6 +48,9 @@ require("nvim-treesitter.configs").setup({
},
})
-- load cmp on InsertEnter
vim.api.nvim_create_autocmd("InsertEnter", {
callback = function()
local cmp = require("cmp")
local luasnip = require("luasnip")
require("copilot_cmp").setup()
@ -102,6 +105,8 @@ cmp.setup({
{ name = "orgmode", priority = 9 },
},
})
end,
})
---merge tables
---@param ... table[]