Lazy load more stuff

This commit is contained in:
2025-01-03 18:27:23 +01:00
parent 33e482e675
commit 73939399ad
9 changed files with 25 additions and 17 deletions

2
.gitignore vendored
View File

@@ -1,3 +1,3 @@
result result
log log*
.luarc.json .luarc.json

View File

@@ -40,7 +40,8 @@ return {
{ {
"git-conflict.nvim", "git-conflict.nvim",
lazy = false, -- load on enter to detect + highlight conflicts
event = { "BufReadPost", "BufWritePost", "BufNewFile" },
keys = { keys = {
{ "c<", "<Plug>(git-conflict-our)", desc = "Accept ours (top one)" }, { "c<", "<Plug>(git-conflict-our)", desc = "Accept ours (top one)" },
{ "c>", "<Plug>(git-conflict-theirs)", desc = "Accept their (bottom one)" }, { "c>", "<Plug>(git-conflict-theirs)", desc = "Accept their (bottom one)" },

View File

@@ -1,19 +1,7 @@
return { return {
{
"nvim-navic",
opts = {
highlight = true,
lsp = {
auto_attach = true,
},
},
after = function(plug)
require("nvim-navic").setup(plug.opts)
end,
},
{ {
"lualine.nvim", "lualine.nvim",
event = "DeferredUIEnter",
opts = { opts = {
options = { options = {
theme = "auto", theme = "auto",
@@ -113,4 +101,18 @@ return {
require("lualine").setup(plug.opts) require("lualine").setup(plug.opts)
end, end,
}, },
{
"nvim-navic",
event = "DeferredUIEnter",
opts = {
highlight = true,
lsp = {
auto_attach = true,
},
},
after = function(plug)
require("nvim-navic").setup(plug.opts)
end,
},
} }

View File

@@ -1,6 +1,7 @@
return { return {
{ {
"mini.icons", "mini.icons",
event = "DeferredUIEnter",
enabled = vim.g.have_nerd_font, enabled = vim.g.have_nerd_font,
after = function() after = function()
require("mini.icons").setup(); require("mini.icons").setup();

View File

@@ -1,6 +1,7 @@
return { return {
{ {
"nvim-surround", "nvim-surround",
event = "DeferredUIEnter",
after = function() after = function()
require("nvim-surround").setup({}) require("nvim-surround").setup({})
end, end,

View File

@@ -1,7 +1,7 @@
return { return {
{ {
"noice.nvim", "noice.nvim",
lazy = false, event = "DeferredUIEnter",
keys = { keys = {
{ "<leader>zl", "<cmd>Noice<cr>", desc = "List messages" }, { "<leader>zl", "<cmd>Noice<cr>", desc = "List messages" },
}, },

View File

@@ -1,6 +1,7 @@
return { return {
{ {
"statuscol.nvim", "statuscol.nvim",
event = "DeferredUIEnter",
after = function() after = function()
local builtin = require("statuscol.builtin") local builtin = require("statuscol.builtin")
require("statuscol").setup({ require("statuscol").setup({

View File

@@ -37,7 +37,7 @@ return {
{ {
"ts-comments.nvim", "ts-comments.nvim",
event = { "VimEnter" }, event = { "BufReadPost", "BufWritePost", "BufNewFile" },
after = function() after = function()
require("ts-comments").setup({}) require("ts-comments").setup({})
end, end,

View File

@@ -8,6 +8,7 @@ return {
{ {
"which-key.nvim", "which-key.nvim",
event = "DeferredUIEnter",
opts = { opts = {
plugins = { spelling = true }, plugins = { spelling = true },
icons = { icons = {
@@ -75,6 +76,7 @@ return {
{ {
"virt-column.nvim", "virt-column.nvim",
event = { "BufReadPost", "BufWritePost", "BufNewFile" },
opts = { opts = {
char = "", char = "",
}, },