feat(nvim): add lazy loading for cmp
parent
0556bfe81e
commit
2df38d379d
|
@ -48,11 +48,14 @@ require("nvim-treesitter.configs").setup({
|
|||
},
|
||||
})
|
||||
|
||||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
require("copilot_cmp").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()
|
||||
|
||||
cmp.setup({
|
||||
cmp.setup({
|
||||
formatting = {
|
||||
format = require("lspkind").cmp_format({
|
||||
mode = "symbol", -- show only symbol annotations
|
||||
|
@ -101,6 +104,8 @@ cmp.setup({
|
|||
{ name = "nvim_lsp", priority = 9 },
|
||||
{ name = "orgmode", priority = 9 },
|
||||
},
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
---merge tables
|
||||
|
|
Loading…
Reference in New Issue