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:
parent
eec90ad7e2
commit
ea224ebbc1
2 changed files with 4 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -3,9 +3,7 @@ local writing_ft = { "quarto", "pandoc", "markdown", "text", "tex" }
|
|||
local prose_plugs = {
|
||||
-- UI improvements
|
||||
-- provide distraction free writing
|
||||
{ "folke/zen-mode.nvim", config = true, event = "VeryLazy" },
|
||||
-- provide even distraction free-er writing (lowlight paragraphs)
|
||||
{ "folke/twilight.nvim", event = "VeryLazy" },
|
||||
{ "folke/zen-mode.nvim", config = true, cmd = { "ZenMode" }, dependencies = { "folke/twilight.nvim" } },
|
||||
{
|
||||
"andrewferrier/wrapping.nvim",
|
||||
config = function()
|
||||
|
|
Loading…
Reference in a new issue