feat(nvim): add lazy loading for cmp
This commit is contained in:
parent
0556bfe81e
commit
2df38d379d
1 changed files with 56 additions and 51 deletions
|
@ -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 cmp = require("cmp")
|
||||||
local luasnip = require("luasnip")
|
local luasnip = require("luasnip")
|
||||||
require("copilot_cmp").setup()
|
require("copilot_cmp").setup()
|
||||||
|
@ -102,6 +105,8 @@ cmp.setup({
|
||||||
{ name = "orgmode", priority = 9 },
|
{ name = "orgmode", priority = 9 },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
---merge tables
|
---merge tables
|
||||||
---@param ... table[]
|
---@param ... table[]
|
||||||
|
|
Loading…
Reference in a new issue