nvim: Lazy load zen-mode, nvim-cmp

Correctly lazy load nvim-cmp as much as possible.
Loading it with certain events but also before lsp.
See here: https://github.com/hrsh7th/nvim-cmp/discussions/688#discussioncomment-1891544
This commit is contained in:
Marty Oehme 2023-12-09 01:11:36 +01:00
parent eec90ad7e2
commit ea224ebbc1
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A
2 changed files with 4 additions and 5 deletions

View file

@ -59,7 +59,8 @@ return {
"WhoIsSethDaniel/mason-tool-installer.nvim",
},
},
event = "BufReadPost",
event = { "BufRead", "BufNewFile", "InsertEnter" },
after = { "nvim-cmp" },
config = function()
require("plugins.config.lsp")
end,
@ -232,7 +233,7 @@ return {
config = function()
require("plugins.config.cmp")
end,
event = { "InsertEnter", "CmdlineEnter", "VeryLazy" },
event = { "InsertEnter", "CmdlineEnter" },
},
-- loading animations for some LSP