⚡️ perf(lazy-load): delegate plugins to their cmd/keymaps
Increase performance: Allow plugins to only load with their commands and keymaps whenever possible
This commit is contained in:
+49
-2
@@ -58,7 +58,15 @@ return {
|
||||
},
|
||||
{ -- Alternate
|
||||
"ton/vim-alternate",
|
||||
lazy = true,
|
||||
ft = { "cpp", "h", "hpp", "c" },
|
||||
keys = {
|
||||
{ -- Toggle Alternate
|
||||
"<leader>a",
|
||||
"<cmd>Alternate<cr>",
|
||||
desc = "Toggle Alternate",
|
||||
},
|
||||
},
|
||||
},
|
||||
{ -- Completion
|
||||
"hrsh7th/nvim-cmp",
|
||||
@@ -104,18 +112,57 @@ return {
|
||||
},
|
||||
{ -- Colorizer
|
||||
"norcalli/nvim-colorizer.lua",
|
||||
event = "InsertEnter",
|
||||
event = "BufEnter",
|
||||
config = function()
|
||||
require("colorizer").setup()
|
||||
end,
|
||||
},
|
||||
{ -- Substitute
|
||||
"gbprod/substitute.nvim",
|
||||
event = "InsertEnter",
|
||||
lazy = true,
|
||||
opts = {
|
||||
yank_substituted_text = false,
|
||||
preserve_cursor_position = true,
|
||||
},
|
||||
keys = {
|
||||
{ -- Substitute operator in normal mode
|
||||
"x",
|
||||
function()
|
||||
require("substitute").operator()
|
||||
end,
|
||||
desc = "Substitute operator",
|
||||
},
|
||||
{ -- Substitute line in normal mode
|
||||
"xx",
|
||||
function()
|
||||
require("substitute").line()
|
||||
end,
|
||||
desc = "Substitute line",
|
||||
},
|
||||
{ -- Substitute end of line in normal mode
|
||||
"X",
|
||||
function()
|
||||
require("substitute").eol()
|
||||
end,
|
||||
desc = "Substitute end of line",
|
||||
},
|
||||
{ -- Substitute visual selection in visual mode
|
||||
"x",
|
||||
function()
|
||||
require("substitute").visual()
|
||||
end,
|
||||
desc = "Substitute visual selection",
|
||||
mode = "x",
|
||||
},
|
||||
{
|
||||
"<leader>r",
|
||||
function()
|
||||
require("substitute").visual()
|
||||
end,
|
||||
desc = "Substitute",
|
||||
mode = "x",
|
||||
},
|
||||
},
|
||||
},
|
||||
{ -- mini.splitjoin
|
||||
"echasnovski/mini.splitjoin",
|
||||
|
||||
Reference in New Issue
Block a user