mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-30 14:49:43 +02:00
perf: lazy load most plugins
This commit is contained in:
parent
2d3140f0d7
commit
74bd5e16aa
15 changed files with 198 additions and 99 deletions
|
@ -6,7 +6,7 @@ local core_plugins = {
|
|||
lazy = true,
|
||||
dependencies = { "mason-lspconfig.nvim", "nlsp-settings.nvim" },
|
||||
},
|
||||
{ "williamboman/mason-lspconfig.nvim", lazy = true },
|
||||
{ "williamboman/mason-lspconfig.nvim", lazy = true, dependencies = "mason.nvim" },
|
||||
{ "tamago324/nlsp-settings.nvim", lazy = true },
|
||||
{ "jose-elias-alvarez/null-ls.nvim", lazy = true },
|
||||
{
|
||||
|
@ -14,17 +14,20 @@ local core_plugins = {
|
|||
config = function()
|
||||
require("lvim.core.mason").setup()
|
||||
end,
|
||||
lazy = true,
|
||||
},
|
||||
{
|
||||
"folke/tokyonight.nvim",
|
||||
lazy = not vim.startswith(lvim.colorscheme, "tokyonight"),
|
||||
},
|
||||
{
|
||||
"lunarvim/lunar.nvim",
|
||||
lazy = lvim.colorscheme ~= "lunar",
|
||||
},
|
||||
{ "Tastyep/structlog.nvim" },
|
||||
{ "Tastyep/structlog.nvim", lazy = true },
|
||||
|
||||
{ "nvim-lua/popup.nvim" },
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
{ "nvim-lua/popup.nvim", lazy = true },
|
||||
{ "nvim-lua/plenary.nvim", lazy = true },
|
||||
-- Telescope
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
|
@ -113,21 +116,23 @@ local core_plugins = {
|
|||
vim.opt.rtp:prepend(path) -- treesitter needs to be before nvim's runtime in rtp
|
||||
require("lvim.core.treesitter").setup()
|
||||
end,
|
||||
event = "User FileOpened",
|
||||
dependencies = "nvim-ts-context-commentstring",
|
||||
},
|
||||
{
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
event = "VeryLazy",
|
||||
lazy = true,
|
||||
},
|
||||
|
||||
-- NvimTree
|
||||
{
|
||||
"kyazdani42/nvim-tree.lua",
|
||||
-- event = "BufWinOpen",
|
||||
-- cmd = "NvimTreeToggle",
|
||||
config = function()
|
||||
require("lvim.core.nvimtree").setup()
|
||||
end,
|
||||
enabled = lvim.builtin.nvimtree.active,
|
||||
cmd = { "NvimTreeToggle", "NvimTreeOpen", "NvimTreeFocus" },
|
||||
event = "User DirOpened",
|
||||
},
|
||||
-- Lir
|
||||
{
|
||||
|
@ -136,13 +141,14 @@ local core_plugins = {
|
|||
require("lvim.core.lir").setup()
|
||||
end,
|
||||
enabled = lvim.builtin.lir.active,
|
||||
event = "User DirOpened",
|
||||
},
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
config = function()
|
||||
require("lvim.core.gitsigns").setup()
|
||||
end,
|
||||
event = "BufRead",
|
||||
event = "User FileOpened",
|
||||
enabled = lvim.builtin.gitsigns.active,
|
||||
},
|
||||
|
||||
|
@ -159,10 +165,10 @@ local core_plugins = {
|
|||
-- Comments
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
event = "BufRead",
|
||||
config = function()
|
||||
require("lvim.core.comment").setup()
|
||||
end,
|
||||
keys = { { "gc", mode = { "n", "v" } }, { "gb", mode = { "n", "v" } } },
|
||||
enabled = lvim.builtin.comment.active,
|
||||
},
|
||||
|
||||
|
@ -179,6 +185,7 @@ local core_plugins = {
|
|||
{
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
enabled = lvim.use_icons,
|
||||
lazy = true,
|
||||
},
|
||||
|
||||
-- Status Line and Bufferline
|
||||
|
@ -189,6 +196,7 @@ local core_plugins = {
|
|||
config = function()
|
||||
require("lvim.core.lualine").setup()
|
||||
end,
|
||||
event = "VimEnter",
|
||||
enabled = lvim.builtin.lualine.active,
|
||||
},
|
||||
|
||||
|
@ -198,6 +206,7 @@ local core_plugins = {
|
|||
config = function()
|
||||
require("lvim.core.breadcrumbs").setup()
|
||||
end,
|
||||
event = "User FileOpened",
|
||||
enabled = lvim.builtin.breadcrumbs.active,
|
||||
},
|
||||
|
||||
|
@ -207,17 +216,18 @@ local core_plugins = {
|
|||
require("lvim.core.bufferline").setup()
|
||||
end,
|
||||
branch = "main",
|
||||
event = "User FileOpened",
|
||||
enabled = lvim.builtin.bufferline.active,
|
||||
},
|
||||
|
||||
-- Debugging
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
-- event = "BufWinEnter",
|
||||
config = function()
|
||||
require("lvim.core.dap").setup()
|
||||
end,
|
||||
enabled = lvim.builtin.dap.active,
|
||||
event = "User FileOpened",
|
||||
},
|
||||
|
||||
-- Debugger user interface
|
||||
|
@ -227,6 +237,7 @@ local core_plugins = {
|
|||
require("lvim.core.dap").setup_ui()
|
||||
end,
|
||||
enabled = lvim.builtin.dap.active,
|
||||
event = "User FileOpened",
|
||||
},
|
||||
|
||||
-- alpha
|
||||
|
@ -260,7 +271,7 @@ local core_plugins = {
|
|||
config = function()
|
||||
require("lvim.core.illuminate").setup()
|
||||
end,
|
||||
event = "VeryLazy",
|
||||
event = "User FileOpened",
|
||||
enabled = lvim.builtin.illuminate.active,
|
||||
},
|
||||
|
||||
|
@ -269,6 +280,7 @@ local core_plugins = {
|
|||
config = function()
|
||||
require("lvim.core.indentlines").setup()
|
||||
end,
|
||||
event = "User FileOpened",
|
||||
enabled = lvim.builtin.indentlines.active,
|
||||
},
|
||||
|
||||
|
@ -283,7 +295,7 @@ local core_plugins = {
|
|||
end
|
||||
end)
|
||||
end,
|
||||
enabled = lvim.colorscheme == "onedarker",
|
||||
lazy = lvim.colorscheme ~= "onedarker",
|
||||
},
|
||||
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue