diff --git a/.gitignore b/.gitignore index 4f5e3e1..703c2dd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ result -log +log* .luarc.json diff --git a/nvim/lua/plugins/git.lua b/nvim/lua/plugins/git.lua index c79412b..66cb074 100644 --- a/nvim/lua/plugins/git.lua +++ b/nvim/lua/plugins/git.lua @@ -40,7 +40,8 @@ return { { "git-conflict.nvim", - lazy = false, + -- load on enter to detect + highlight conflicts + event = { "BufReadPost", "BufWritePost", "BufNewFile" }, keys = { { "c<", "(git-conflict-our)", desc = "Accept ours (top one)" }, { "c>", "(git-conflict-theirs)", desc = "Accept their (bottom one)" }, diff --git a/nvim/lua/plugins/line.lua b/nvim/lua/plugins/line.lua index 3bebe45..c638281 100644 --- a/nvim/lua/plugins/line.lua +++ b/nvim/lua/plugins/line.lua @@ -1,19 +1,7 @@ return { - { - "nvim-navic", - opts = { - highlight = true, - lsp = { - auto_attach = true, - }, - }, - after = function(plug) - require("nvim-navic").setup(plug.opts) - end, - }, - { "lualine.nvim", + event = "DeferredUIEnter", opts = { options = { theme = "auto", @@ -113,4 +101,18 @@ return { require("lualine").setup(plug.opts) end, }, + + { + "nvim-navic", + event = "DeferredUIEnter", + opts = { + highlight = true, + lsp = { + auto_attach = true, + }, + }, + after = function(plug) + require("nvim-navic").setup(plug.opts) + end, + }, } diff --git a/nvim/lua/plugins/mini.lua b/nvim/lua/plugins/mini.lua index 3f5f8d3..e975c95 100644 --- a/nvim/lua/plugins/mini.lua +++ b/nvim/lua/plugins/mini.lua @@ -1,6 +1,7 @@ return { { "mini.icons", + event = "DeferredUIEnter", enabled = vim.g.have_nerd_font, after = function() require("mini.icons").setup(); diff --git a/nvim/lua/plugins/motions.lua b/nvim/lua/plugins/motions.lua index ca682c0..d60dee6 100644 --- a/nvim/lua/plugins/motions.lua +++ b/nvim/lua/plugins/motions.lua @@ -1,6 +1,7 @@ return { { "nvim-surround", + event = "DeferredUIEnter", after = function() require("nvim-surround").setup({}) end, diff --git a/nvim/lua/plugins/noice.lua b/nvim/lua/plugins/noice.lua index e47ad9e..1b0d5e3 100644 --- a/nvim/lua/plugins/noice.lua +++ b/nvim/lua/plugins/noice.lua @@ -1,7 +1,7 @@ return { { "noice.nvim", - lazy = false, + event = "DeferredUIEnter", keys = { { "zl", "Noice", desc = "List messages" }, }, diff --git a/nvim/lua/plugins/statuscol.lua b/nvim/lua/plugins/statuscol.lua index a5038d9..3622330 100644 --- a/nvim/lua/plugins/statuscol.lua +++ b/nvim/lua/plugins/statuscol.lua @@ -1,6 +1,7 @@ return { { "statuscol.nvim", + event = "DeferredUIEnter", after = function() local builtin = require("statuscol.builtin") require("statuscol").setup({ diff --git a/nvim/lua/plugins/treesitter.lua b/nvim/lua/plugins/treesitter.lua index 3f85bc8..a56ccd6 100644 --- a/nvim/lua/plugins/treesitter.lua +++ b/nvim/lua/plugins/treesitter.lua @@ -37,7 +37,7 @@ return { { "ts-comments.nvim", - event = { "VimEnter" }, + event = { "BufReadPost", "BufWritePost", "BufNewFile" }, after = function() require("ts-comments").setup({}) end, diff --git a/nvim/lua/plugins/ui.lua b/nvim/lua/plugins/ui.lua index 67c0b1a..d32875c 100644 --- a/nvim/lua/plugins/ui.lua +++ b/nvim/lua/plugins/ui.lua @@ -8,6 +8,7 @@ return { { "which-key.nvim", + event = "DeferredUIEnter", opts = { plugins = { spelling = true }, icons = { @@ -75,6 +76,7 @@ return { { "virt-column.nvim", + event = { "BufReadPost", "BufWritePost", "BufNewFile" }, opts = { char = "▕", },