♻️ refactor(nvim): simplified the prefix of keymaps for all extras

This commit is contained in:
Sergio Laín 2024-08-09 18:11:48 +02:00
parent 83601270a3
commit 7111964212
No known key found for this signature in database
GPG key ID: 8429B2EE312F8150
24 changed files with 224 additions and 187 deletions

View file

@ -1,4 +1,4 @@
local prefix = "<leader>A" local prefix = "<leader>a"
return { return {
{ {

View file

@ -1,3 +1,5 @@
local prefix = "<leader>C"
return { return {
{ {
"jackMort/ChatGPT.nvim", "jackMort/ChatGPT.nvim",
@ -80,26 +82,26 @@ return {
}, },
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ "<leader>Cc", "<cmd>ChatGPT<CR>", desc = "ChatGPT" }, { prefix .. "c", "<cmd>ChatGPT<CR>", desc = "ChatGPT" },
{ "<leader>Ce", "<cmd>ChatGPTEditWithInstruction<CR>", desc = "Edit With Instruction", mode = { "n", "v" } }, { prefix .. "e", "<cmd>ChatGPTEditWithInstruction<CR>", desc = "Edit With Instruction", mode = { "n", "v" } },
{ "<leader>Cg", "<cmd>ChatGPTRun grammar_correction<CR>", desc = "Grammar Correction", mode = { "n", "v" } }, { prefix .. "g", "<cmd>ChatGPTRun grammar_correction<CR>", desc = "Grammar Correction", mode = { "n", "v" } },
{ "<leader>Ct", "<cmd>ChatGPTRun translate<CR>", desc = "Translate", mode = { "n", "v" } }, { prefix .. "t", "<cmd>ChatGPTRun translate<CR>", desc = "Translate", mode = { "n", "v" } },
{ "<leader>Ck", "<cmd>ChatGPTRun keywords<CR>", desc = "Keywords", mode = { "n", "v" } }, { prefix .. "k", "<cmd>ChatGPTRun keywords<CR>", desc = "Keywords", mode = { "n", "v" } },
{ "<leader>Cd", "<cmd>ChatGPTRun docstring<CR>", desc = "Docstring", mode = { "n", "v" } }, { prefix .. "d", "<cmd>ChatGPTRun docstring<CR>", desc = "Docstring", mode = { "n", "v" } },
{ "<leader>CT", "<cmd>ChatGPTRun add_tests<CR>", desc = "Add Tests", mode = { "n", "v" } }, { prefix .. "T", "<cmd>ChatGPTRun add_tests<CR>", desc = "Add Tests", mode = { "n", "v" } },
{ "<leader>Co", "<cmd>ChatGPTRun optimize_code<CR>", desc = "Optimize Code", mode = { "n", "v" } }, { prefix .. "o", "<cmd>ChatGPTRun optimize_code<CR>", desc = "Optimize Code", mode = { "n", "v" } },
{ "<leader>Cs", "<cmd>ChatGPTRun summarize<CR>", desc = "Summarize", mode = { "n", "v" } }, { prefix .. "s", "<cmd>ChatGPTRun summarize<CR>", desc = "Summarize", mode = { "n", "v" } },
{ "<leader>Cf", "<cmd>ChatGPTRun fix_bugs<CR>", desc = "Fix Bugs", mode = { "n", "v" } }, { prefix .. "f", "<cmd>ChatGPTRun fix_bugs<CR>", desc = "Fix Bugs", mode = { "n", "v" } },
{ "<leader>Cx", "<cmd>ChatGPTRun explain_code<CR>", desc = "Explain Code", mode = { "n", "v" } }, { prefix .. "x", "<cmd>ChatGPTRun explain_code<CR>", desc = "Explain Code", mode = { "n", "v" } },
{ "<leader>Cr", "<cmd>ChatGPTRun roxygen_edit<CR>", desc = "Roxygen Edit", mode = { "n", "v" } }, { prefix .. "r", "<cmd>ChatGPTRun roxygen_edit<CR>", desc = "Roxygen Edit", mode = { "n", "v" } },
{ "<leader>Cl", "<cmd>ChatGPTRun code_readability_analysis<CR>", desc = "Code Readability Analysis", mode = { "n", "v" }, }, { prefix .. "l", "<cmd>ChatGPTRun code_readability_analysis<CR>", desc = "Code Readability Analysis", mode = { "n", "v" }, },
}, },
}, },
{ {
"folke/which-key.nvim", "folke/which-key.nvim",
opts = { opts = {
spec = { spec = {
{ "<leader>C", group = "chatGPT", icon = "󰚩 " }, { prefix, group = "chatGPT", icon = "󰚩 " },
}, },
}, },
}, },

View file

@ -1,14 +1,16 @@
local prefix = "<leader>A"
return { return {
{ import = "lazyvim.plugins.extras.coding.neogen" }, { import = "lazyvim.plugins.extras.coding.neogen" },
{ {
"danymat/neogen", "danymat/neogen",
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ "<leader>ad", function() require("neogen").generate() end, desc = "Default Annotation" }, { prefix .. "d", function() require("neogen").generate() end, desc = "Default Annotation" },
{ "<leader>aC", function() require("neogen").generate({ type = "class" }) end, desc = "Class" }, { prefix .. "C", function() require("neogen").generate({ type = "class" }) end, desc = "Class" },
{ "<leader>af", function() require("neogen").generate({ type = "func" }) end, desc = "Function" }, { prefix .. "f", function() require("neogen").generate({ type = "func" }) end, desc = "Function" },
{ "<leader>at", function() require("neogen").generate({ type = "type" }) end, desc = "Type" }, { prefix .. "t", function() require("neogen").generate({ type = "type" }) end, desc = "Type" },
{ "<leader>aF", function() require("neogen").generate({ type = "file" }) end, desc = "File" }, { prefix .. "F", function() require("neogen").generate({ type = "file" }) end, desc = "File" },
{ "<leader>cn", false }, { "<leader>cn", false },
}, },
}, },
@ -18,15 +20,15 @@ return {
opts = {}, opts = {},
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ "<leader>ag", "<Cmd>DookuGenerate<CR>", desc = "Generate HTML Docs" }, { prefix .. "g", "<Cmd>DookuGenerate<CR>", desc = "Generate HTML Docs" },
{ "<leader>ao", "<Cmd>DookuOpen<CR>", desc = "Open HTML Docs" }, { prefix .. "o", "<Cmd>DookuOpen<CR>", desc = "Open HTML Docs" },
}, },
}, },
{ {
"folke/which-key.nvim", "folke/which-key.nvim",
opts = { opts = {
spec = { spec = {
{ "<leader>a", group = "annotation/snippets", icon = "" }, { prefix, group = "annotation/snippets", icon = "" },
}, },
}, },
}, },

View file

@ -1,3 +1,5 @@
local prefix = "<leader>dd"
return { return {
{ {
"andrewferrier/debugprint.nvim", "andrewferrier/debugprint.nvim",
@ -6,28 +8,28 @@ return {
}, },
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ "<Leader>ddl", function() return require("debugprint").debugprint() end, desc = "Under Line", expr = true }, { prefix .. "l", function() return require("debugprint").debugprint() end, desc = "Under Line", expr = true },
{ "<Leader>ddL", function() return require("debugprint").debugprint({ above = true }) end, desc = "Above Line", expr = true }, { prefix .. "L", function() return require("debugprint").debugprint({ above = true }) end, desc = "Above Line", expr = true },
{ {
"<Leader>ddv", prefix .. "v",
function() return require("debugprint").debugprint({ variable = true }) end, function() return require("debugprint").debugprint({ variable = true }) end,
desc = "Variable Under Line", desc = "Variable Under Line",
expr = true, expr = true,
}, },
{ {
"<Leader>ddV", prefix .. "V",
function() return require("debugprint").debugprint({ above = true, variable = true }) end, function() return require("debugprint").debugprint({ above = true, variable = true }) end,
desc = "Variable Above Line", desc = "Variable Above Line",
expr = true, expr = true,
}, },
{ "<Leader>ddd", function() return require("debugprint").deleteprints() end, desc = "Delete All" }, { prefix .. "d", function() return require("debugprint").deleteprints() end, desc = "Delete All" },
}, },
}, },
{ {
"folke/which-key.nvim", "folke/which-key.nvim",
opts = { opts = {
spec = { spec = {
{ "<leader>dd", group = "debugPrint", icon = "󰐪 " }, { prefix, group = "debugPrint", icon = "󰐪 " },
}, },
}, },
}, },

View file

@ -1,3 +1,5 @@
local prefix = "<leader>a"
return { return {
{ {
"chrisgrieser/nvim-scissors", "chrisgrieser/nvim-scissors",
@ -9,15 +11,15 @@ return {
}, },
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ "<leader>aS", function() require("scissors").editSnippet() end, desc = "Edit Snippets" }, { prefix .. "S", function() require("scissors").editSnippet() end, desc = "Edit Snippets" },
{ "<leader>as", mode = { "n", "v" }, function() require("scissors").addNewSnippet() end, desc = "Add Snippets" }, { prefix .. "s", mode = { "n", "v" }, function() require("scissors").addNewSnippet() end, desc = "Add Snippets" },
}, },
}, },
{ {
"folke/which-key.nvim", "folke/which-key.nvim",
opts = { opts = {
spec = { spec = {
{ "<leader>a", group = "annotation/snippets", icon = "" }, { prefix, group = "annotation/snippets", icon = "" },
}, },
}, },
}, },

View file

@ -1,3 +1,5 @@
local prefix = "<leader>cu"
return { return {
{ {
"michaelb/sniprun", "michaelb/sniprun",
@ -48,21 +50,21 @@ return {
}, },
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ "<leader>cur", "<cmd>SnipRun<cr>", desc = "Run" }, { prefix .. "r", "<cmd>SnipRun<cr>", desc = "Run" },
{ "<F6>", "<cmd>SnipRun<cr>", desc = "Run" }, { "<F6>", "<cmd>SnipRun<cr>", desc = "Run" },
{ "<leader>cur", function() require("sniprun").run("v") end, mode = { "v" }, desc = "Run" }, { prefix .. "r", function() require("sniprun").run("v") end, mode = { "v" }, desc = "Run" },
{ "<F6>", function() require("sniprun").run("v") end, mode = { "v" }, desc = "Run" }, { "<F6>", function() require("sniprun").run("v") end, mode = { "v" }, desc = "Run" },
{ "<leader>cui", function() require("sniprun").info() end, desc = "Info" }, { prefix .. "i", function() require("sniprun").info() end, desc = "Info" },
{ "<leader>cuR", function() require("sniprun").reset() end, desc = "Reset" }, { prefix .. "R", function() require("sniprun").reset() end, desc = "Reset" },
{ "<S-F6>", function() require("sniprun").reset() end, desc = "Reset" }, { "<S-F6>", function() require("sniprun").reset() end, desc = "Reset" },
{ "<leader>cul", function() require("sniprun.live_mode").toggle() end, desc = "Live" }, { prefix .. "l", function() require("sniprun.live_mode").toggle() end, desc = "Live" },
}, },
}, },
{ {
"folke/which-key.nvim", "folke/which-key.nvim",
opts = { opts = {
spec = { spec = {
{ "<leader>cu", group = "runner", icon = "󰜎 " }, { prefix, group = "runner", icon = "󰜎 " },
}, },
}, },
}, },

View file

@ -1,3 +1,5 @@
local prefix = "<leader>db"
return { return {
{ {
"mfussenegger/nvim-dap", "mfussenegger/nvim-dap",
@ -8,9 +10,9 @@ return {
vscode = false, vscode = false,
event = "LazyFile", event = "LazyFile",
keys = { keys = {
{ "<leader>dbd", "<cmd>PBClearAllBreakpoints<cr>", desc = "Delete All Breakpoints" }, { prefix .. "d", "<cmd>PBClearAllBreakpoints<cr>", desc = "Delete All Breakpoints" },
{ "<leader>dbB", "<cmd>PBSetConditionalBreakpoint<cr>", desc = "Breakpoint Condition" }, { prefix .. "B", "<cmd>PBSetConditionalBreakpoint<cr>", desc = "Breakpoint Condition" },
{ "<leader>dbb", "<cmd>PBToggleBreakpoint<cr>", desc = "Toggle Breakpoint" }, { prefix .. "b", "<cmd>PBToggleBreakpoint<cr>", desc = "Toggle Breakpoint" },
{ "<F2>", "<cmd>PBToggleBreakpoint<cr>", desc = "Toggle Breakpoint" }, { "<F2>", "<cmd>PBToggleBreakpoint<cr>", desc = "Toggle Breakpoint" },
}, },
opts = { opts = {
@ -26,7 +28,7 @@ return {
"folke/which-key.nvim", "folke/which-key.nvim",
opts = { opts = {
spec = { spec = {
{ "<leader>db", group = "breakpoints", icon = "" }, { prefix, group = "breakpoints", icon = "" },
}, },
}, },
}, },

View file

@ -1,3 +1,5 @@
local prefix = "<leader>o"
return { return {
{ {
"https://codeberg.org/esensar/nvim-dev-container", "https://codeberg.org/esensar/nvim-dev-container",
@ -14,11 +16,11 @@ return {
dependencies = { "nvim-treesitter/nvim-treesitter" }, dependencies = { "nvim-treesitter/nvim-treesitter" },
opts = {}, opts = {},
keys = { keys = {
{ "<leader>os", "<cmd>DevcontainerStart<cr>", desc = "Start" }, { prefix .. "s", "<cmd>DevcontainerStart<cr>", desc = "Start" },
{ "<leader>oS", "<cmd>DevcontainerStop<cr>", desc = "Stop" }, { prefix .. "S", "<cmd>DevcontainerStop<cr>", desc = "Stop" },
{ "<leader>ol", "<cmd>DevcontainerLogs<cr>", desc = "Log" }, { prefix .. "l", "<cmd>DevcontainerLogs<cr>", desc = "Log" },
{ "<leader>oc", "<cmd>DevcontainerEditNearestConfig<cr>", desc = "Config" }, { prefix .. "c", "<cmd>DevcontainerEditNearestConfig<cr>", desc = "Config" },
{ "<leader>oa", "<cmd>DevcontainerAttach<cr>", desc = "Attach" }, { prefix .. "a", "<cmd>DevcontainerAttach<cr>", desc = "Attach" },
}, },
}, },
{ {

View file

@ -1,3 +1,5 @@
local prefix = "<leader>gC"
return { return {
{ {
"sindrets/diffview.nvim", "sindrets/diffview.nvim",
@ -22,24 +24,24 @@ return {
opts.keymaps = { opts.keymaps = {
--stylua: ignore --stylua: ignore
view = { view = {
{ "n", "<leader>gCo", actions.conflict_choose("ours"), { desc = "Choose the OURS version of a conflict" } }, { "n", prefix .. "o", actions.conflict_choose("ours"), { desc = "Choose the OURS version of a conflict" } },
{ "n", "<leader>gCt", actions.conflict_choose("theirs"), { desc = "Choose the THEIRS version of a conflict" } }, { "n", prefix .. "t", actions.conflict_choose("theirs"), { desc = "Choose the THEIRS version of a conflict" } },
{ "n", "<leader>gCb", actions.conflict_choose("base"), { desc = "Choose the BASE version of a conflict" } }, { "n", prefix .. "b", actions.conflict_choose("base"), { desc = "Choose the BASE version of a conflict" } },
{ "n", "<leader>gCa", actions.conflict_choose("all"), { desc = "Choose all the versions of a conflict" } }, { "n", prefix .. "a", actions.conflict_choose("all"), { desc = "Choose all the versions of a conflict" } },
{ "n", "<leader>gCx", actions.conflict_choose("none"), { desc = "Delete the conflict region" } }, { "n", prefix .. "x", actions.conflict_choose("none"), { desc = "Delete the conflict region" } },
{ "n", "<leader>gCO", actions.conflict_choose_all("ours"), { desc = "Choose the OURS version of a conflict for the whole file" } }, { "n", prefix .. "O", actions.conflict_choose_all("ours"), { desc = "Choose the OURS version of a conflict for the whole file" } },
{ "n", "<leader>gCT", actions.conflict_choose_all("theirs"), { desc = "Choose the THEIRS version of a conflict for the whole file" } }, { "n", prefix .. "T", actions.conflict_choose_all("theirs"), { desc = "Choose the THEIRS version of a conflict for the whole file" } },
{ "n", "<leader>gCB", actions.conflict_choose_all("base"), { desc = "Choose the BASE version of a conflict for the whole file" } }, { "n", prefix .. "B", actions.conflict_choose_all("base"), { desc = "Choose the BASE version of a conflict for the whole file" } },
{ "n", "<leader>gCA", actions.conflict_choose_all("all"), { desc = "Choose all the versions of a conflict for the whole file" } }, { "n", prefix .. "A", actions.conflict_choose_all("all"), { desc = "Choose all the versions of a conflict for the whole file" } },
{ "n", "<leader>gCX", actions.conflict_choose_all("none"), { desc = "Delete the conflict region for the whole file" } }, { "n", prefix .. "X", actions.conflict_choose_all("none"), { desc = "Delete the conflict region for the whole file" } },
}, },
--stylua: ignore --stylua: ignore
file_panel = { file_panel = {
{ "n", "<leader>gCO", actions.conflict_choose_all("ours"), { desc = "Choose the OURS version of a conflict for the whole file" } }, { "n", prefix .. "O", actions.conflict_choose_all("ours"), { desc = "Choose the OURS version of a conflict for the whole file" } },
{ "n", "<leader>gCT", actions.conflict_choose_all("theirs"), { desc = "Choose the THEIRS version of a conflict for the whole file" } }, { "n", prefix .. "T", actions.conflict_choose_all("theirs"), { desc = "Choose the THEIRS version of a conflict for the whole file" } },
{ "n", "<leader>gCB", actions.conflict_choose_all("base"), { desc = "Choose the BASE version of a conflict for the whole file" } }, { "n", prefix .. "B", actions.conflict_choose_all("base"), { desc = "Choose the BASE version of a conflict for the whole file" } },
{ "n", "<leader>gCA", actions.conflict_choose_all("all"), { desc = "Choose all the versions of a conflict for the whole file" } }, { "n", prefix .. "A", actions.conflict_choose_all("all"), { desc = "Choose all the versions of a conflict for the whole file" } },
{ "n", "<leader>gCX", actions.conflict_choose_all("none"), { desc = "Delete the conflict region for the whole file" } }, { "n", prefix .. "X", actions.conflict_choose_all("none"), { desc = "Delete the conflict region for the whole file" } },
}, },
} }
end, end,
@ -48,7 +50,7 @@ return {
"folke/which-key.nvim", "folke/which-key.nvim",
opts = { opts = {
spec = { spec = {
{ "<leader>gC", group = "conflicts", icon = "" }, { prefix, group = "conflicts", icon = "" },
}, },
}, },
}, },

View file

@ -1,3 +1,5 @@
local prefix = "<leader>gC"
return { return {
{ {
"akinsho/git-conflict.nvim", "akinsho/git-conflict.nvim",
@ -7,10 +9,10 @@ return {
version = "v1.0.0", version = "v1.0.0",
cmd = { "GitConflictChooseTheirs", "GitConflictChooseOurs", "GitConflictChooseBoth", "GitConflictListQf" }, cmd = { "GitConflictChooseTheirs", "GitConflictChooseOurs", "GitConflictChooseBoth", "GitConflictListQf" },
keys = { keys = {
{ "<leader>gCt", "<cmd>GitConflictChooseTheirs<cr>", desc = "Choose Their Changes" }, { prefix .. "t", "<cmd>GitConflictChooseTheirs<cr>", desc = "Choose Their Changes" },
{ "<leader>gCo", "<cmd>GitConflictChooseOurs<cr>", desc = "Choose Our Changes" }, { prefix .. "o", "<cmd>GitConflictChooseOurs<cr>", desc = "Choose Our Changes" },
{ "<leader>gCb", "<cmd>GitConflictChooseBoth<cr>", desc = "Choose Both changes" }, { prefix .. "b", "<cmd>GitConflictChooseBoth<cr>", desc = "Choose Both changes" },
{ "<leader>gCl", "<cmd>GitConflictListQf<cr>", desc = "Git Conflict Quicklist" }, { prefix .. "l", "<cmd>GitConflictListQf<cr>", desc = "Git Conflict Quicklist" },
{ "[g", "<cmd>GitConflictPrevConflict<cr>", desc = "Prev Git Conflict" }, { "[g", "<cmd>GitConflictPrevConflict<cr>", desc = "Prev Git Conflict" },
{ "]g", "<cmd>GitConflictPrevConflict<cr>", desc = "Next Git Conflict" }, { "]g", "<cmd>GitConflictPrevConflict<cr>", desc = "Next Git Conflict" },
}, },
@ -19,7 +21,7 @@ return {
"folke/which-key.nvim", "folke/which-key.nvim",
opts = { opts = {
spec = { spec = {
{ "<leader>gC", group = "conflicts", icon = "" }, { prefix, group = "conflicts", icon = "" },
}, },
}, },
}, },

View file

@ -1,3 +1,5 @@
local prefix = "<leader>gw"
return { return {
{ {
"ThePrimeagen/git-worktree.nvim", "ThePrimeagen/git-worktree.nvim",
@ -9,15 +11,15 @@ return {
end, end,
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ "<leader>gwm", function() require("telescope").extensions.git_worktree.git_worktrees() end, desc = "Manage Worktrees" }, { prefix .. "m", function() require("telescope").extensions.git_worktree.git_worktrees() end, desc = "Manage Worktrees" },
{ "<leader>gwc", function() require("telescope").extensions.git_worktree.create_git_worktree() end, desc = "Create Worktree" }, { prefix .. "c", function() require("telescope").extensions.git_worktree.create_git_worktree() end, desc = "Create Worktree" },
}, },
}, },
{ {
"folke/which-key.nvim", "folke/which-key.nvim",
opts = { opts = {
spec = { spec = {
{ "<leader>gw", group = "worktrees", icon = "" }, { prefix, group = "worktrees", icon = "" },
}, },
}, },
}, },

View file

@ -1,17 +1,19 @@
local prefix = "<leader>m"
local keys = {} local keys = {}
-- stylua: ignore start -- stylua: ignore start
for i = 1, 9 do for i = 1, 9 do
table.insert(keys, { "<leader>m" .. i, "<cmd>Grapple select index=" .. i .. "<CR>", desc = "File " .. i }) table.insert(keys, { prefix .. i, "<cmd>Grapple select index=" .. i .. "<CR>", desc = "File " .. i })
end end
table.insert(keys, { "<leader>ma", "<cmd>Grapple tag<CR>", desc = "Add Mark" }) table.insert(keys, { prefix .. "a", "<cmd>Grapple tag<CR>", desc = "Add Mark" })
table.insert(keys, { "<leader>mm", "<cmd>Grapple toggle_tags<CR>", desc = "Marks" }) table.insert(keys, { prefix .. "m", "<cmd>Grapple toggle_tags<CR>", desc = "Marks" })
table.insert(keys, { "<leader>mt", "<cmd>Telescope grapple tags<CR>", desc = "Marks (Telescope)" }) table.insert(keys, { prefix .. "t", "<cmd>Telescope grapple tags<CR>", desc = "Marks (Telescope)" })
table.insert(keys, { "<leader>mC", "<cmd>Grapple reset<CR>", desc = "Clear all Marks" }) table.insert(keys, { prefix .. "C", "<cmd>Grapple reset<CR>", desc = "Clear all Marks" })
table.insert(keys, { "<leader>mc", "<cmd>Grapple untag<CR>", desc = "Clear Current Mark" }) table.insert(keys, { prefix .. "c", "<cmd>Grapple untag<CR>", desc = "Clear Current Mark" })
table.insert(keys, { "<leader>ms", "<cmd>Grapple toggle_scopes<CR>", desc = "Scopes" }) table.insert(keys, { prefix .. "s", "<cmd>Grapple toggle_scopes<CR>", desc = "Scopes" })
table.insert(keys, { "<leader>mS", "<cmd>Grapple toggle_loaded<CR>", desc = "Loaded Scopes" }) table.insert(keys, { prefix .. "S", "<cmd>Grapple toggle_loaded<CR>", desc = "Loaded Scopes" })
table.insert(keys, { "]k", "<cmd>Grapple cycle forward<CR>", desc = "Next Mark" }) table.insert(keys, { "]k", "<cmd>Grapple cycle forward<CR>", desc = "Next Mark" })
table.insert(keys, { "[k", "<cmd>Grapple cycle backward<CR>", desc = "Prev Mark" }) table.insert(keys, { "[k", "<cmd>Grapple cycle backward<CR>", desc = "Prev Mark" })
@ -74,7 +76,7 @@ return {
"folke/which-key.nvim", "folke/which-key.nvim",
opts = { opts = {
spec = { spec = {
{ "<leader>m", group = "marks", icon = "󰛢 " }, { prefix, group = "marks", icon = "󰛢 " },
}, },
}, },
}, },

View file

@ -1,14 +1,16 @@
local prefix = "<leader>m"
local keys = {} local keys = {}
-- stylua: ignore start -- stylua: ignore start
for i = 1, 9 do for i = 1, 9 do
table.insert(keys, { "<leader>m" .. i, function() require("harpoon"):list():select(i) end, desc = "File " .. i }) table.insert(keys, { prefix .. i, function() require("harpoon"):list():select(i) end, desc = "File " .. i })
end end
table.insert(keys, { "<leader>ma", function() require("harpoon"):list():add() end, desc = "Add Mark" }) table.insert(keys, { prefix .. "a", function() require("harpoon"):list():add() end, desc = "Add Mark" })
table.insert(keys, { "<leader>mm", function() require("harpoon").ui:toggle_quick_menu(require("harpoon"):list()) end, desc = "Marks" }) table.insert(keys, { prefix .. "m", function() require("harpoon").ui:toggle_quick_menu(require("harpoon"):list()) end, desc = "Marks" })
table.insert(keys, { "<leader>mt", "<cmd>Telescope harpoon marks<CR>", desc = "Marks (Telescope)" }) table.insert(keys, { prefix .. "t", "<cmd>Telescope harpoon marks<CR>", desc = "Marks (Telescope)" })
table.insert(keys, { "<leader>mc", function() require("harpoon"):list():clear() end, desc = "Clear all Marks" }) table.insert(keys, { prefix .. "c", function() require("harpoon"):list():clear() end, desc = "Clear all Marks" })
table.insert(keys, { "]k", function() require("harpoon"):list():next() end, desc = "Next Mark" }) table.insert(keys, { "]k", function() require("harpoon"):list():next() end, desc = "Next Mark" })
table.insert(keys, { "[k", function() require("harpoon"):list():prev() end, desc = "Prev Mark" }) table.insert(keys, { "[k", function() require("harpoon"):list():prev() end, desc = "Prev Mark" })
@ -101,7 +103,7 @@ return {
"folke/which-key.nvim", "folke/which-key.nvim",
opts = { opts = {
spec = { spec = {
{ "<leader>m", group = "marks", icon = "󰛢 " }, { prefix, group = "marks", icon = "󰛢 " },
}, },
}, },
}, },

View file

@ -1,3 +1,5 @@
local prefix = "<leader>pw"
return { return {
{ {
"vuki656/package-info.nvim", "vuki656/package-info.nvim",
@ -8,11 +10,11 @@ return {
opts = {}, opts = {},
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ "<leader>pwv", function() require('package-info').show({ force = true }) end, desc = "Show Package Versions" }, { prefix .. "v", function() require('package-info').show({ force = true }) end, desc = "Show Package Versions" },
{ "<leader>pwu", function() require('package-info').update() end, desc = "Update Package" }, { prefix .. "u", function() require('package-info').update() end, desc = "Update Package" },
{ "<leader>pwr", function() require('package-info').delete() end, desc = "Remove Package" }, { prefix .. "r", function() require('package-info').delete() end, desc = "Remove Package" },
{ "<leader>pwc", function() require('package-info').change_version() end, desc = "Change Package Version" }, { prefix .. "c", function() require('package-info').change_version() end, desc = "Change Package Version" },
{ "<leader>pwi", function() require('package-info').install() end, desc = "Install New Dependency" }, { prefix .. "i", function() require('package-info').install() end, desc = "Install New Dependency" },
}, },
}, },
{ {
@ -20,7 +22,7 @@ return {
optional = true, optional = true,
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ "<leader>pwp", "<cmd>FloatermNew --disposable --name=lazynpm --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<root> lazynpm<CR>", desc = "Lazynpm" }, { prefix .. "p", "<cmd>FloatermNew --disposable --name=lazynpm --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<root> lazynpm<CR>", desc = "Lazynpm" },
}, },
}, },
{ {
@ -28,7 +30,7 @@ return {
opts = { opts = {
spec = { spec = {
{ "<leader>p", group = "packages/dependencies", icon = "" }, { "<leader>p", group = "packages/dependencies", icon = "" },
{ "<leader>pw", group = "web", icon = "󰖟 " }, { prefix, group = "web", icon = "󰖟 " },
}, },
}, },
}, },

View file

@ -1,3 +1,5 @@
local prefix = "<leader>th"
return { return {
{ {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
@ -52,8 +54,8 @@ return {
end, end,
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ "<leader>thp", function() require("rest-nvim").run(true) end, desc = "Preview Request" }, { prefix .. "p", function() require("rest-nvim").run(true) end, desc = "Preview Request" },
{ "<leader>thr", function() require("rest-nvim").run() end, desc = "Run Request" }, { prefix .. "r", function() require("rest-nvim").run() end, desc = "Run Request" },
{ "<leader>sv", function() require("telescope").extensions.rest.select_env() end, desc = "Env Files" }, { "<leader>sv", function() require("telescope").extensions.rest.select_env() end, desc = "Env Files" },
}, },
}, },
@ -61,7 +63,7 @@ return {
"folke/which-key.nvim", "folke/which-key.nvim",
opts = { opts = {
spec = { spec = {
{ "<leader>th", group = "http", icon = "󱞒 " }, { prefix, group = "http", icon = "󱞒 " },
}, },
}, },
}, },

View file

@ -1,3 +1,5 @@
local prefix = "sr"
return { return {
{ {
"roobert/search-replace.nvim", "roobert/search-replace.nvim",
@ -7,28 +9,21 @@ return {
}, },
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ "<leader>srb", "<CMD>SearchReplaceSingleBufferVisualSelection<CR>", desc = "Buffer", mode = "v" }, { prefix .. "b", "<CMD>SearchReplaceSingleBufferVisualSelection<CR>", desc = "Buffer", mode = "v" },
{ "<leader>srv", "<CMD>SearchReplaceWithinVisualSelection<CR>", desc = "Visual Selection", mode = "v" }, { prefix .. "v", "<CMD>SearchReplaceWithinVisualSelection<CR>", desc = "Visual Selection", mode = "v" },
{ "<leader>srw", "<CMD>SearchReplaceWithinVisualSelectionCWord<CR>", desc = "Word on Buffer", mode = "v" }, { prefix .. "w", "<CMD>SearchReplaceWithinVisualSelectionCWord<CR>", desc = "Word on Buffer", mode = "v" },
{ "<leader>srb", "<CMD>SearchReplaceSingleBufferOpen<CR>", desc = "Buffer", mode = "n" }, { prefix .. "b", "<CMD>SearchReplaceSingleBufferOpen<CR>", desc = "Buffer", mode = "n" },
{ "<leader>srw", "<CMD>SearchReplaceSingleBufferCWord<CR>", desc = "Word on Buffer", mode = "n" }, { prefix .. "w", "<CMD>SearchReplaceSingleBufferCWord<CR>", desc = "Word on Buffer", mode = "n" },
{ "<leader>srW", "<CMD>SearchReplaceSingleBufferCWORD<CR>", desc = "WORD on Buffer", mode = "n" }, { prefix .. "W", "<CMD>SearchReplaceSingleBufferCWORD<CR>", desc = "WORD on Buffer", mode = "n" },
{ "<leader>sre", "<CMD>SearchReplaceSingleBufferCExpr<CR>", desc = "Expression on Buffer", mode = "n" }, { prefix .. "e", "<CMD>SearchReplaceSingleBufferCExpr<CR>", desc = "Expression on Buffer", mode = "n" },
-- { "n", "<leader>rbs", "<CMD>SearchReplaceMultiBufferSelections<CR>", desc = "Search and Replace in Multi Buffer Selections" },
-- { "n", "<leader>rbo", "<CMD>SearchReplaceMultiBufferOpen<CR>", desc = "Search and Replace in Multi Buffer, Open" },
-- { "n", "<leader>rbw", "<CMD>SearchReplaceMultiBufferCWord<CR>", desc = "Search and Replace in Multi Buffer (Current Word)" },
-- { "n", "<leader>rbW", "<CMD>SearchReplaceMultiBufferCWORD<CR>", desc = "Search and Replace in Multi Buffer (Current WORD)" },
-- { "n", "<leader>rbe", "<CMD>SearchReplaceMultiBufferCExpr<CR>", desc = "Search and Replace in Multi Buffer (Current Expression)" },
-- { "n", "<leader>rbf", "<CMD>SearchReplaceMultiBufferCFile<CR>", desc = "Search and Replace in Multi Buffer (Current File)" },
}, },
}, },
{ {
"folke/which-key.nvim", "folke/which-key.nvim",
opts = { opts = {
spec = { spec = {
{ "<leader>sr", group = "replace", icon = "" }, { prefix, group = "replace", icon = "" },
}, },
}, },
}, },
@ -36,7 +31,7 @@ return {
"MagicDuck/grug-far.nvim", "MagicDuck/grug-far.nvim",
keys = { keys = {
{ {
"<leader>srp", prefix .. "p",
function() function()
local grug = require("grug-far") local grug = require("grug-far")
local ext = vim.bo.buftype == "" and vim.fn.expand("%:e") local ext = vim.bo.buftype == "" and vim.fn.expand("%:e")

View file

@ -1,3 +1,5 @@
local prefix = "<leader>sr"
return { return {
{ {
"nvim-pack/nvim-spectre", "nvim-pack/nvim-spectre",
@ -17,16 +19,16 @@ return {
}, },
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ "<leader>srg", function() require("spectre").toggle() end, desc = "Globally" }, { prefix .. "g", function() require("spectre").toggle() end, desc = "Globally" },
{ "<leader>srG", mode = { "n" }, function() require("spectre").open_visual({ select_word = true }) end, desc = "Word Globally" }, { prefix .. "G", mode = { "n" }, function() require("spectre").open_visual({ select_word = true }) end, desc = "Word Globally" },
{ "<leader>srG", mode = { "v" }, function() require("spectre").open_visual() end, desc = "Word Globally" }, { prefix .. "G", mode = { "v" }, function() require("spectre").open_visual() end, desc = "Word Globally" },
}, },
}, },
{ {
"folke/which-key.nvim", "folke/which-key.nvim",
opts = { opts = {
spec = { spec = {
{ "<leader>sr", group = "replace", icon = "" }, { prefix, group = "replace", icon = "" },
}, },
}, },
}, },

View file

@ -1,3 +1,5 @@
local symbols_prefix = "<leader>ss"
local symbols_workspace_prefix = "<leader>sS"
local actions = require("telescope.actions") local actions = require("telescope.actions")
return { return {
@ -7,39 +9,39 @@ return {
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ {
"<leader>ssa", symbols_prefix .. "a",
LazyVim.pick("lsp_document_symbols", { symbols = { "Class", "Function", "Method", "Constructor", "Interface", "Module", "Struct", "Trait", "Field", "Property", "Enum", "Constant" } }), LazyVim.pick("lsp_document_symbols", { symbols = { "Class", "Function", "Method", "Constructor", "Interface", "Module", "Struct", "Trait", "Field", "Property", "Enum", "Constant" } }),
desc = "All", desc = "All",
}, },
{ "<leader>ssc", LazyVim.pick("lsp_document_symbols", { symbols = { "Class" } }), desc = "Class" }, { symbols_prefix .. "c", LazyVim.pick("lsp_document_symbols", { symbols = { "Class" } }), desc = "Class" },
{ "<leader>ssf", LazyVim.pick("lsp_document_symbols", { symbols = { "Function" } }), desc = "Function" }, { symbols_prefix .. "f", LazyVim.pick("lsp_document_symbols", { symbols = { "Function" } }), desc = "Function" },
{ "<leader>ssm", LazyVim.pick("lsp_document_symbols", { symbols = { "Method" } }), desc = "Method" }, { symbols_prefix .. "m", LazyVim.pick("lsp_document_symbols", { symbols = { "Method" } }), desc = "Method" },
{ "<leader>ssC", LazyVim.pick("lsp_document_symbols", { symbols = { "Constructor" } }), desc = "Constructor" }, { symbols_prefix .. "C", LazyVim.pick("lsp_document_symbols", { symbols = { "Constructor" } }), desc = "Constructor" },
{ "<leader>sse", LazyVim.pick("lsp_document_symbols", { symbols = { "Enum" } }), desc = "Enum" }, { symbols_prefix .. "e", LazyVim.pick("lsp_document_symbols", { symbols = { "Enum" } }), desc = "Enum" },
{ "<leader>ssi", LazyVim.pick("lsp_document_symbols", { symbols = { "Interface" } }), desc = "Interface" }, { symbols_prefix .. "i", LazyVim.pick("lsp_document_symbols", { symbols = { "Interface" } }), desc = "Interface" },
{ "<leader>ssM", LazyVim.pick("lsp_document_symbols", { symbols = { "Module" } }), desc = "Module" }, { symbols_prefix .. "M", LazyVim.pick("lsp_document_symbols", { symbols = { "Module" } }), desc = "Module" },
{ "<leader>sss", LazyVim.pick("lsp_document_symbols", { symbols = { "Struct" } }), desc = "Struct" }, { symbols_prefix .. "s", LazyVim.pick("lsp_document_symbols", { symbols = { "Struct" } }), desc = "Struct" },
{ "<leader>sst", LazyVim.pick("lsp_document_symbols", { symbols = { "Trait" } }), desc = "Trait" }, { symbols_prefix .. "t", LazyVim.pick("lsp_document_symbols", { symbols = { "Trait" } }), desc = "Trait" },
{ "<leader>ssF", LazyVim.pick("lsp_document_symbols", { symbols = { "Field" } }), desc = "Field" }, { symbols_prefix .. "F", LazyVim.pick("lsp_document_symbols", { symbols = { "Field" } }), desc = "Field" },
{ "<leader>ssp", LazyVim.pick("lsp_document_symbols", { symbols = { "Property" } }), desc = "Property" }, { symbols_prefix .. "p", LazyVim.pick("lsp_document_symbols", { symbols = { "Property" } }), desc = "Property" },
{ "<leader>ssv", LazyVim.pick("lsp_document_symbols", { symbols = { "Variable", "Parameter" } }), desc = "Variable" }, { symbols_prefix .. "v", LazyVim.pick("lsp_document_symbols", { symbols = { "Variable", "Parameter" } }), desc = "Variable" },
{ {
"<leader>sSa", symbols_workspace_prefix .. "a",
LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Class", "Function", "Method", "Constructor", "Interface", "Module", "Struct", "Trait", "Field", "Property", "Enum", "Constant" } }), LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Class", "Function", "Method", "Constructor", "Interface", "Module", "Struct", "Trait", "Field", "Property", "Enum", "Constant" } }),
desc = "All", desc = "All",
}, },
{ "<leader>sSc", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Class" } }), desc = "Class" }, { symbols_workspace_prefix .. "c", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Class" } }), desc = "Class" },
{ "<leader>sSf", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Function" } }), desc = "Function" }, { symbols_workspace_prefix .. "f", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Function" } }), desc = "Function" },
{ "<leader>sSm", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Method" } }), desc = "Method" }, { symbols_workspace_prefix .. "m", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Method" } }), desc = "Method" },
{ "<leader>sSC", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Constructor" } }), desc = "Constructor" }, { symbols_workspace_prefix .. "C", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Constructor" } }), desc = "Constructor" },
{ "<leader>sSe", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Enum" } }), desc = "Enum" }, { symbols_workspace_prefix .. "e", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Enum" } }), desc = "Enum" },
{ "<leader>sSi", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Interface" } }), desc = "Interface" }, { symbols_workspace_prefix .. "i", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Interface" } }), desc = "Interface" },
{ "<leader>sSM", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Module" } }), desc = "Module" }, { symbols_workspace_prefix .. "M", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Module" } }), desc = "Module" },
{ "<leader>sSs", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Struct" } }), desc = "Struct" }, { symbols_workspace_prefix .. "s", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Struct" } }), desc = "Struct" },
{ "<leader>sSt", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Trait" } }), desc = "Trait" }, { symbols_workspace_prefix .. "t", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Trait" } }), desc = "Trait" },
{ "<leader>sSF", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Field" } }), desc = "Field" }, { symbols_workspace_prefix .. "F", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Field" } }), desc = "Field" },
{ "<leader>sSp", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Property" } }), desc = "Property" }, { symbols_workspace_prefix .. "p", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Property" } }), desc = "Property" },
{ "<leader>sSv", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Variable", "Parameter" } }), desc = "Variable" }, { symbols_workspace_prefix .. "v", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Variable", "Parameter" } }), desc = "Variable" },
{ "<leader>sA", LazyVim.pick("treesitter"), desc = "Treesitter Symbols" }, { "<leader>sA", LazyVim.pick("treesitter"), desc = "Treesitter Symbols" },
{ "<leader>sP", "<cmd>Telescope builtin<cr>", desc = "Pickers (Telescope)" }, { "<leader>sP", "<cmd>Telescope builtin<cr>", desc = "Pickers (Telescope)" },
{ "<leader>fh", LazyVim.pick("find_files", { hidden = true }), desc = "Find Files (hidden)" }, { "<leader>fh", LazyVim.pick("find_files", { hidden = true }), desc = "Find Files (hidden)" },
@ -117,8 +119,8 @@ return {
"folke/which-key.nvim", "folke/which-key.nvim",
opts = { opts = {
spec = { spec = {
{ "<leader>ss", group = "goto symbols", icon = "" }, { symbols_prefix, group = "goto symbols", icon = "" },
{ "<leader>sS", group = "goto symbols (Workspace)", icon = "" }, { symbols_workspace_prefix, group = "goto symbols (Workspace)", icon = "" },
}, },
}, },
}, },

View file

@ -1,3 +1,5 @@
local package_prefix = "<leader>pp"
-- LSP Server to use for Python. -- LSP Server to use for Python.
-- Set to "basedpyright" to use basedpyright instead of pyright. -- Set to "basedpyright" to use basedpyright instead of pyright.
vim.g.lazyvim_python_lsp = "basedpyright" vim.g.lazyvim_python_lsp = "basedpyright"
@ -85,9 +87,9 @@ return {
opts = {}, opts = {},
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ "<leader>ppu", function() require("py-requirements").upgrade() end, desc = "Update Package" }, { package_prefix .. "u", function() require("py-requirements").upgrade() end, desc = "Update Package" },
{ "<leader>ppi", function() require("py-requirements").show_description() end, desc = "Package Info" }, { package_prefix .. "i", function() require("py-requirements").show_description() end, desc = "Package Info" },
{ "<leader>ppa", function() require("py-requirements").upgrade_all() end, desc = "Update All Packages" }, { package_prefix .. "a", function() require("py-requirements").upgrade_all() end, desc = "Update All Packages" },
}, },
}, },
{ {
@ -95,7 +97,7 @@ return {
opts = { opts = {
spec = { spec = {
{ "<leader>p", group = "packages/dependencies", icon = "" }, { "<leader>p", group = "packages/dependencies", icon = "" },
{ "<leader>pp", group = "python", icon = "" }, { package_prefix, group = "python", icon = "" },
}, },
}, },
}, },

View file

@ -1,3 +1,5 @@
local package_prefix = "<leader>pr"
return { return {
{ import = "lazyvim.plugins.extras.lang.rust" }, { import = "lazyvim.plugins.extras.lang.rust" },
{ {
@ -15,23 +17,23 @@ return {
"Saecki/crates.nvim", "Saecki/crates.nvim",
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ "<leader>prR", function() require("crates").reload() end, desc = "Reload" }, { package_prefix .. "R", function() require("crates").reload() end, desc = "Reload" },
{ "<leader>pru", function() require("crates").update_crate() end, desc = "Update Crate" }, { package_prefix .. "u", function() require("crates").update_crate() end, desc = "Update Crate" },
{ "<leader>pru", mode = "v", function() require("crates").update_crates() end, desc = "Update Crates" }, { package_prefix .. "u", mode = "v", function() require("crates").update_crates() end, desc = "Update Crates" },
{ "<leader>pra", function() require("crates").update_all_crates() end, desc = "Update All Crates" }, { package_prefix .. "a", function() require("crates").update_all_crates() end, desc = "Update All Crates" },
{ "<leader>prU", function() require("crates").upgrade_crate() end, desc = "Upgrade Crate" }, { package_prefix .. "U", function() require("crates").upgrade_crate() end, desc = "Upgrade Crate" },
{ "<leader>prU", mode = "v", function() require("crates").upgrade_crates() end, desc = "Upgrade Crates" }, { package_prefix .. "U", mode = "v", function() require("crates").upgrade_crates() end, desc = "Upgrade Crates" },
{ "<leader>prA", function() require("crates").upgrade_all_crates() end, desc = "Upgrade All Crates" }, { package_prefix .. "A", function() require("crates").upgrade_all_crates() end, desc = "Upgrade All Crates" },
{ "<leader>prt", function() require("crates").expand_plain_crate_to_inline_table() end, desc = "Extract into Inline Table" }, { package_prefix .. "t", function() require("crates").expand_plain_crate_to_inline_table() end, desc = "Extract into Inline Table" },
{ "<leader>prT", function() require("crates").extract_crate_into_table() end, desc = "Extract into Table" }, { package_prefix .. "T", function() require("crates").extract_crate_into_table() end, desc = "Extract into Table" },
{ "<leader>prh", function() require("crates").open_homepage() end, desc = "Homepage" }, { package_prefix .. "h", function() require("crates").open_homepage() end, desc = "Homepage" },
{ "<leader>prr", function() require("crates").open_repository() end, desc = "Repo" }, { package_prefix .. "r", function() require("crates").open_repository() end, desc = "Repo" },
{ "<leader>prd", function() require("crates").open_documentation() end, desc = "Documentation" }, { package_prefix .. "d", function() require("crates").open_documentation() end, desc = "Documentation" },
{ "<leader>prc", function() require("crates").open_crates_io() end, desc = "Crates.io" }, { package_prefix .. "c", function() require("crates").open_crates_io() end, desc = "Crates.io" },
}, },
}, },
{ {
@ -39,7 +41,7 @@ return {
opts = { opts = {
spec = { spec = {
{ "<leader>p", group = "packages/dependencies", icon = "" }, { "<leader>p", group = "packages/dependencies", icon = "" },
{ "<leader>pr", group = "rust", icon = "" }, { package_prefix, group = "rust", icon = "" },
}, },
}, },
}, },

View file

@ -1,4 +1,5 @@
local sql_ft = { "sql", "mysql", "plsql" } local sql_ft = { "sql", "mysql", "plsql" }
local prefix = "<leader>D"
return { return {
{ import = "lazyvim.plugins.extras.lang.python" }, { import = "lazyvim.plugins.extras.lang.python" },
@ -8,18 +9,18 @@ return {
{ "jsborjesson/vim-uppercase-sql", ft = sql_ft }, { "jsborjesson/vim-uppercase-sql", ft = sql_ft },
}, },
keys = { keys = {
{ "<leader>Da", "<cmd>DBUIAddConnection<cr>", desc = "Add Connection" }, { prefix .. "a", "<cmd>DBUIAddConnection<cr>", desc = "Add Connection" },
{ "<leader>Du", "<cmd>DBUIToggle<cr>", desc = "Toggle UI" }, { prefix .. "u", "<cmd>DBUIToggle<cr>", desc = "Toggle UI" },
{ "<leader>Df", "<cmd>DBUIFindBuffer<cr>", desc = "Find Buffer" }, { prefix .. "f", "<cmd>DBUIFindBuffer<cr>", desc = "Find Buffer" },
{ "<leader>Dr", "<cmd>DBUIRenameBuffer<cr>", desc = "Rename Buffer" }, { prefix .. "r", "<cmd>DBUIRenameBuffer<cr>", desc = "Rename Buffer" },
{ "<leader>Dq", "<cmd>DBUILastQueryInfo<cr>", desc = "Last Query Info" }, { prefix .. "q", "<cmd>DBUILastQueryInfo<cr>", desc = "Last Query Info" },
}, },
}, },
{ {
"folke/which-key.nvim", "folke/which-key.nvim",
opts = { opts = {
spec = { spec = {
{ "<leader>D", group = "database", icon = "" }, { prefix, group = "database", icon = "" },
}, },
}, },
}, },

View file

@ -1,4 +1,5 @@
local nvim_0_10 = vim.fn.has("nvim-0.10") local nvim_0_10 = vim.fn.has("nvim-0.10")
local prefix = "<leader>cl"
return { return {
{ {
@ -8,13 +9,13 @@ return {
keys[#keys + 1] = { "<leader>cl", false } keys[#keys + 1] = { "<leader>cl", false }
keys[#keys + 1] = { "<leader>cil", "<cmd>LspInfo<cr>", desc = "Lsp" } keys[#keys + 1] = { "<leader>cil", "<cmd>LspInfo<cr>", desc = "Lsp" }
keys[#keys + 1] = { "<leader>clr", "<cmd>LspRestart<cr>", desc = "Restart Lsp" } keys[#keys + 1] = { prefix .. "r", "<cmd>LspRestart<cr>", desc = "Restart Lsp" }
keys[#keys + 1] = { "<leader>cls", "<cmd>LspStart<cr>", desc = "Start Lsp" } keys[#keys + 1] = { prefix .. "s", "<cmd>LspStart<cr>", desc = "Start Lsp" }
keys[#keys + 1] = { "<leader>clS", "<cmd>LspStop<cr>", desc = "Stop Lsp" } keys[#keys + 1] = { prefix .. "S", "<cmd>LspStop<cr>", desc = "Stop Lsp" }
-- stylua: ignore start -- stylua: ignore start
keys[#keys + 1] = { "<leader>clr", function() vim.lsp.buf.remove_workspace_folder() end, desc = "Remove workspace" } keys[#keys + 1] = { prefix .. "r", function() vim.lsp.buf.remove_workspace_folder() end, desc = "Remove workspace" }
keys[#keys + 1] = { "<leader>cla", function() vim.lsp.buf.add_workspace_folder() end, desc = "Add workspace" } keys[#keys + 1] = { prefix .. "a", function() vim.lsp.buf.add_workspace_folder() end, desc = "Add workspace" }
-- stylua: ignore end -- stylua: ignore end
end, end,
opts = { opts = {
@ -58,7 +59,7 @@ return {
"folke/which-key.nvim", "folke/which-key.nvim",
opts = { opts = {
spec = { spec = {
{ "<leader>cL", group = "lsp", icon = "" }, { "<leader>cl", group = "lsp", icon = "" },
}, },
}, },
}, },

View file

@ -1,23 +1,25 @@
local prefix = "<leader>ac"
return { return {
{ {
"LudoPinelli/comment-box.nvim", "LudoPinelli/comment-box.nvim",
opts = {}, opts = {},
vscode = true, vscode = true,
keys = { keys = {
{ "<leader>acb", "<cmd>CBccbox<CR>", mode = { "n", "v" }, desc = "Comment Box" }, { prefix .. "b", "<cmd>CBccbox<CR>", mode = { "n", "v" }, desc = "Comment Box" },
{ "<leader>act", "<cmd>CBllline<CR>", mode = { "n", "v" }, desc = "Tiled Line" }, { prefix .. "t", "<cmd>CBllline<CR>", mode = { "n", "v" }, desc = "Tiled Line" },
{ "<leader>acl", "<cmd>CBline<CR>", desc = "Line" }, { prefix .. "l", "<cmd>CBline<CR>", desc = "Line" },
{ "<leader>acm", "<cmd>CBllbox14<CR>", mode = { "n", "v" }, desc = "Marked" }, { prefix .. "m", "<cmd>CBllbox14<CR>", mode = { "n", "v" }, desc = "Marked" },
{ "<leader>acc", "<cmd>CBcatalog<CR>", desc = "Catalog" }, { prefix .. "c", "<cmd>CBcatalog<CR>", desc = "Catalog" },
{ "<leader>acd", "<cmd>CBd<CR>", mode = { "n", "v" }, desc = "Delete Comment Style" }, { prefix .. "d", "<cmd>CBd<CR>", mode = { "n", "v" }, desc = "Delete Comment Style" },
}, },
}, },
{ {
"folke/which-key.nvim", "folke/which-key.nvim",
opts = { opts = {
spec = { spec = {
{ "<leader>a", group = "annotation/snippets", icon = "" }, { "<leader>A", group = "annotation/snippets", icon = "" },
{ "<leader>ac", group = "comments", icon = "" }, { prefix, group = "comments", icon = "" },
}, },
}, },
}, },

View file

@ -1,3 +1,5 @@
local prefix = "<leader>si"
return { return {
{ {
"ziontee113/icon-picker.nvim", "ziontee113/icon-picker.nvim",
@ -9,17 +11,17 @@ return {
}, },
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ "<leader>sia", "<cmd>IconPickerNormal<cr>", desc = "All" }, { prefix .. "a", "<cmd>IconPickerNormal<cr>", desc = "All" },
{ "<leader>sis", "<cmd>IconPickerNormal symbols<cr>", desc = "Symbols" }, { prefix .. "s", "<cmd>IconPickerNormal symbols<cr>", desc = "Symbols" },
{ "<leader>sie", "<cmd>IconPickerNormal emoji<cr>", desc = "Emoji" }, { prefix .. "e", "<cmd>IconPickerNormal emoji<cr>", desc = "Emoji" },
{ "<leader>sin", "<cmd>IconPickerNormal nerd_font_v3<cr>", desc = "Nerd Fonts" }, { prefix .. "n", "<cmd>IconPickerNormal nerd_font_v3<cr>", desc = "Nerd Fonts" },
}, },
}, },
{ {
"folke/which-key.nvim", "folke/which-key.nvim",
opts = { opts = {
spec = { spec = {
{ "<leader>si", group = "icons", icon = "" }, { prefix, group = "icons", icon = "" },
}, },
}, },
}, },