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",
|
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
event = "BufReadPost",
|
event = { "BufRead", "BufNewFile", "InsertEnter" },
|
||||||
|
after = { "nvim-cmp" },
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.config.lsp")
|
require("plugins.config.lsp")
|
||||||
end,
|
end,
|
||||||
|
@ -232,7 +233,7 @@ return {
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.config.cmp")
|
require("plugins.config.cmp")
|
||||||
end,
|
end,
|
||||||
event = { "InsertEnter", "CmdlineEnter", "VeryLazy" },
|
event = { "InsertEnter", "CmdlineEnter" },
|
||||||
},
|
},
|
||||||
|
|
||||||
-- loading animations for some LSP
|
-- loading animations for some LSP
|
||||||
|
|
|
@ -3,9 +3,7 @@ local writing_ft = { "quarto", "pandoc", "markdown", "text", "tex" }
|
||||||
local prose_plugs = {
|
local prose_plugs = {
|
||||||
-- UI improvements
|
-- UI improvements
|
||||||
-- provide distraction free writing
|
-- provide distraction free writing
|
||||||
{ "folke/zen-mode.nvim", config = true, event = "VeryLazy" },
|
{ "folke/zen-mode.nvim", config = true, cmd = { "ZenMode" }, dependencies = { "folke/twilight.nvim" } },
|
||||||
-- provide even distraction free-er writing (lowlight paragraphs)
|
|
||||||
{ "folke/twilight.nvim", event = "VeryLazy" },
|
|
||||||
{
|
{
|
||||||
"andrewferrier/wrapping.nvim",
|
"andrewferrier/wrapping.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
|
|
Loading…
Reference in a new issue