diff --git a/.config/nvim/lua/plugins/extras/coding/ai/gen.lua b/.config/nvim/lua/plugins/extras/coding/ai/gen.lua index 42767bf8..c429514d 100644 --- a/.config/nvim/lua/plugins/extras/coding/ai/gen.lua +++ b/.config/nvim/lua/plugins/extras/coding/ai/gen.lua @@ -1,4 +1,4 @@ -local prefix = "A" +local prefix = "a" return { { diff --git a/.config/nvim/lua/plugins/extras/coding/ai/gpt.lua b/.config/nvim/lua/plugins/extras/coding/ai/gpt.lua index 94374083..cb747399 100644 --- a/.config/nvim/lua/plugins/extras/coding/ai/gpt.lua +++ b/.config/nvim/lua/plugins/extras/coding/ai/gpt.lua @@ -1,3 +1,5 @@ +local prefix = "C" + return { { "jackMort/ChatGPT.nvim", @@ -80,26 +82,26 @@ return { }, -- stylua: ignore keys = { - { "Cc", "ChatGPT", desc = "ChatGPT" }, - { "Ce", "ChatGPTEditWithInstruction", desc = "Edit With Instruction", mode = { "n", "v" } }, - { "Cg", "ChatGPTRun grammar_correction", desc = "Grammar Correction", mode = { "n", "v" } }, - { "Ct", "ChatGPTRun translate", desc = "Translate", mode = { "n", "v" } }, - { "Ck", "ChatGPTRun keywords", desc = "Keywords", mode = { "n", "v" } }, - { "Cd", "ChatGPTRun docstring", desc = "Docstring", mode = { "n", "v" } }, - { "CT", "ChatGPTRun add_tests", desc = "Add Tests", mode = { "n", "v" } }, - { "Co", "ChatGPTRun optimize_code", desc = "Optimize Code", mode = { "n", "v" } }, - { "Cs", "ChatGPTRun summarize", desc = "Summarize", mode = { "n", "v" } }, - { "Cf", "ChatGPTRun fix_bugs", desc = "Fix Bugs", mode = { "n", "v" } }, - { "Cx", "ChatGPTRun explain_code", desc = "Explain Code", mode = { "n", "v" } }, - { "Cr", "ChatGPTRun roxygen_edit", desc = "Roxygen Edit", mode = { "n", "v" } }, - { "Cl", "ChatGPTRun code_readability_analysis", desc = "Code Readability Analysis", mode = { "n", "v" }, }, + { prefix .. "c", "ChatGPT", desc = "ChatGPT" }, + { prefix .. "e", "ChatGPTEditWithInstruction", desc = "Edit With Instruction", mode = { "n", "v" } }, + { prefix .. "g", "ChatGPTRun grammar_correction", desc = "Grammar Correction", mode = { "n", "v" } }, + { prefix .. "t", "ChatGPTRun translate", desc = "Translate", mode = { "n", "v" } }, + { prefix .. "k", "ChatGPTRun keywords", desc = "Keywords", mode = { "n", "v" } }, + { prefix .. "d", "ChatGPTRun docstring", desc = "Docstring", mode = { "n", "v" } }, + { prefix .. "T", "ChatGPTRun add_tests", desc = "Add Tests", mode = { "n", "v" } }, + { prefix .. "o", "ChatGPTRun optimize_code", desc = "Optimize Code", mode = { "n", "v" } }, + { prefix .. "s", "ChatGPTRun summarize", desc = "Summarize", mode = { "n", "v" } }, + { prefix .. "f", "ChatGPTRun fix_bugs", desc = "Fix Bugs", mode = { "n", "v" } }, + { prefix .. "x", "ChatGPTRun explain_code", desc = "Explain Code", mode = { "n", "v" } }, + { prefix .. "r", "ChatGPTRun roxygen_edit", desc = "Roxygen Edit", mode = { "n", "v" } }, + { prefix .. "l", "ChatGPTRun code_readability_analysis", desc = "Code Readability Analysis", mode = { "n", "v" }, }, }, }, { "folke/which-key.nvim", opts = { spec = { - { "C", group = "chatGPT", icon = "󰚩 " }, + { prefix, group = "chatGPT", icon = "󰚩 " }, }, }, }, diff --git a/.config/nvim/lua/plugins/extras/coding/annotation.lua b/.config/nvim/lua/plugins/extras/coding/annotation.lua index 29cf31d2..70f07713 100644 --- a/.config/nvim/lua/plugins/extras/coding/annotation.lua +++ b/.config/nvim/lua/plugins/extras/coding/annotation.lua @@ -1,14 +1,16 @@ +local prefix = "A" + return { { import = "lazyvim.plugins.extras.coding.neogen" }, { "danymat/neogen", -- stylua: ignore keys = { - { "ad", function() require("neogen").generate() end, desc = "Default Annotation" }, - { "aC", function() require("neogen").generate({ type = "class" }) end, desc = "Class" }, - { "af", function() require("neogen").generate({ type = "func" }) end, desc = "Function" }, - { "at", function() require("neogen").generate({ type = "type" }) end, desc = "Type" }, - { "aF", function() require("neogen").generate({ type = "file" }) end, desc = "File" }, + { prefix .. "d", function() require("neogen").generate() end, desc = "Default Annotation" }, + { prefix .. "C", function() require("neogen").generate({ type = "class" }) end, desc = "Class" }, + { prefix .. "f", function() require("neogen").generate({ type = "func" }) end, desc = "Function" }, + { prefix .. "t", function() require("neogen").generate({ type = "type" }) end, desc = "Type" }, + { prefix .. "F", function() require("neogen").generate({ type = "file" }) end, desc = "File" }, { "cn", false }, }, }, @@ -18,15 +20,15 @@ return { opts = {}, -- stylua: ignore keys = { - { "ag", "DookuGenerate", desc = "Generate HTML Docs" }, - { "ao", "DookuOpen", desc = "Open HTML Docs" }, + { prefix .. "g", "DookuGenerate", desc = "Generate HTML Docs" }, + { prefix .. "o", "DookuOpen", desc = "Open HTML Docs" }, }, }, { "folke/which-key.nvim", opts = { spec = { - { "a", group = "annotation/snippets", icon = " " }, + { prefix, group = "annotation/snippets", icon = " " }, }, }, }, diff --git a/.config/nvim/lua/plugins/extras/coding/debugprint.lua b/.config/nvim/lua/plugins/extras/coding/debugprint.lua index 669c9f04..16cbe811 100644 --- a/.config/nvim/lua/plugins/extras/coding/debugprint.lua +++ b/.config/nvim/lua/plugins/extras/coding/debugprint.lua @@ -1,3 +1,5 @@ +local prefix = "dd" + return { { "andrewferrier/debugprint.nvim", @@ -6,28 +8,28 @@ return { }, -- stylua: ignore keys = { - { "ddl", function() return require("debugprint").debugprint() end, desc = "Under Line", expr = true }, - { "ddL", function() return require("debugprint").debugprint({ above = true }) end, desc = "Above Line", expr = true }, + { prefix .. "l", function() return require("debugprint").debugprint() end, desc = "Under Line", expr = true }, + { prefix .. "L", function() return require("debugprint").debugprint({ above = true }) end, desc = "Above Line", expr = true }, { - "ddv", + prefix .. "v", function() return require("debugprint").debugprint({ variable = true }) end, desc = "Variable Under Line", expr = true, }, { - "ddV", + prefix .. "V", function() return require("debugprint").debugprint({ above = true, variable = true }) end, desc = "Variable Above Line", expr = true, }, - { "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", opts = { spec = { - { "dd", group = "debugPrint", icon = "󰐪 " }, + { prefix, group = "debugPrint", icon = "󰐪 " }, }, }, }, diff --git a/.config/nvim/lua/plugins/extras/coding/snippets.lua b/.config/nvim/lua/plugins/extras/coding/snippets.lua index c253d4b5..9322293b 100644 --- a/.config/nvim/lua/plugins/extras/coding/snippets.lua +++ b/.config/nvim/lua/plugins/extras/coding/snippets.lua @@ -1,3 +1,5 @@ +local prefix = "a" + return { { "chrisgrieser/nvim-scissors", @@ -9,15 +11,15 @@ return { }, -- stylua: ignore keys = { - { "aS", function() require("scissors").editSnippet() end, desc = "Edit Snippets" }, - { "as", mode = { "n", "v" }, function() require("scissors").addNewSnippet() end, desc = "Add Snippets" }, + { prefix .. "S", function() require("scissors").editSnippet() end, desc = "Edit Snippets" }, + { prefix .. "s", mode = { "n", "v" }, function() require("scissors").addNewSnippet() end, desc = "Add Snippets" }, }, }, { "folke/which-key.nvim", opts = { spec = { - { "a", group = "annotation/snippets", icon = " " }, + { prefix, group = "annotation/snippets", icon = " " }, }, }, }, diff --git a/.config/nvim/lua/plugins/extras/coding/sniprun.lua b/.config/nvim/lua/plugins/extras/coding/sniprun.lua index 17574113..4122a7ba 100644 --- a/.config/nvim/lua/plugins/extras/coding/sniprun.lua +++ b/.config/nvim/lua/plugins/extras/coding/sniprun.lua @@ -1,3 +1,5 @@ +local prefix = "cu" + return { { "michaelb/sniprun", @@ -48,21 +50,21 @@ return { }, -- stylua: ignore keys = { - { "cur", "SnipRun", desc = "Run" }, + { prefix .. "r", "SnipRun", desc = "Run" }, { "", "SnipRun", desc = "Run" }, - { "cur", function() require("sniprun").run("v") end, mode = { "v" }, desc = "Run" }, + { prefix .. "r", function() require("sniprun").run("v") end, mode = { "v" }, desc = "Run" }, { "", function() require("sniprun").run("v") end, mode = { "v" }, desc = "Run" }, - { "cui", function() require("sniprun").info() end, desc = "Info" }, - { "cuR", function() require("sniprun").reset() end, desc = "Reset" }, + { prefix .. "i", function() require("sniprun").info() end, desc = "Info" }, + { prefix .. "R", function() require("sniprun").reset() end, desc = "Reset" }, { "", function() require("sniprun").reset() end, desc = "Reset" }, - { "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", opts = { spec = { - { "cu", group = "runner", icon = "󰜎 " }, + { prefix, group = "runner", icon = "󰜎 " }, }, }, }, diff --git a/.config/nvim/lua/plugins/extras/dap/persistent-breakpoints.lua b/.config/nvim/lua/plugins/extras/dap/persistent-breakpoints.lua index 1e76ca22..b1c28e28 100644 --- a/.config/nvim/lua/plugins/extras/dap/persistent-breakpoints.lua +++ b/.config/nvim/lua/plugins/extras/dap/persistent-breakpoints.lua @@ -1,3 +1,5 @@ +local prefix = "db" + return { { "mfussenegger/nvim-dap", @@ -8,9 +10,9 @@ return { vscode = false, event = "LazyFile", keys = { - { "dbd", "PBClearAllBreakpoints", desc = "Delete All Breakpoints" }, - { "dbB", "PBSetConditionalBreakpoint", desc = "Breakpoint Condition" }, - { "dbb", "PBToggleBreakpoint", desc = "Toggle Breakpoint" }, + { prefix .. "d", "PBClearAllBreakpoints", desc = "Delete All Breakpoints" }, + { prefix .. "B", "PBSetConditionalBreakpoint", desc = "Breakpoint Condition" }, + { prefix .. "b", "PBToggleBreakpoint", desc = "Toggle Breakpoint" }, { "", "PBToggleBreakpoint", desc = "Toggle Breakpoint" }, }, opts = { @@ -26,7 +28,7 @@ return { "folke/which-key.nvim", opts = { spec = { - { "db", group = "breakpoints", icon = " " }, + { prefix, group = "breakpoints", icon = " " }, }, }, }, diff --git a/.config/nvim/lua/plugins/extras/editor/dev-container.lua b/.config/nvim/lua/plugins/extras/editor/dev-container.lua index af6daef3..64f98c9f 100644 --- a/.config/nvim/lua/plugins/extras/editor/dev-container.lua +++ b/.config/nvim/lua/plugins/extras/editor/dev-container.lua @@ -1,3 +1,5 @@ +local prefix = "o" + return { { "https://codeberg.org/esensar/nvim-dev-container", @@ -14,11 +16,11 @@ return { dependencies = { "nvim-treesitter/nvim-treesitter" }, opts = {}, keys = { - { "os", "DevcontainerStart", desc = "Start" }, - { "oS", "DevcontainerStop", desc = "Stop" }, - { "ol", "DevcontainerLogs", desc = "Log" }, - { "oc", "DevcontainerEditNearestConfig", desc = "Config" }, - { "oa", "DevcontainerAttach", desc = "Attach" }, + { prefix .. "s", "DevcontainerStart", desc = "Start" }, + { prefix .. "S", "DevcontainerStop", desc = "Stop" }, + { prefix .. "l", "DevcontainerLogs", desc = "Log" }, + { prefix .. "c", "DevcontainerEditNearestConfig", desc = "Config" }, + { prefix .. "a", "DevcontainerAttach", desc = "Attach" }, }, }, { diff --git a/.config/nvim/lua/plugins/extras/editor/git/diffview.lua b/.config/nvim/lua/plugins/extras/editor/git/diffview.lua index e63672fd..97fdc9a3 100644 --- a/.config/nvim/lua/plugins/extras/editor/git/diffview.lua +++ b/.config/nvim/lua/plugins/extras/editor/git/diffview.lua @@ -1,3 +1,5 @@ +local prefix = "gC" + return { { "sindrets/diffview.nvim", @@ -22,24 +24,24 @@ return { opts.keymaps = { --stylua: ignore view = { - { "n", "gCo", actions.conflict_choose("ours"), { desc = "Choose the OURS version of a conflict" } }, - { "n", "gCt", actions.conflict_choose("theirs"), { desc = "Choose the THEIRS version of a conflict" } }, - { "n", "gCb", actions.conflict_choose("base"), { desc = "Choose the BASE version of a conflict" } }, - { "n", "gCa", actions.conflict_choose("all"), { desc = "Choose all the versions of a conflict" } }, - { "n", "gCx", actions.conflict_choose("none"), { desc = "Delete the conflict region" } }, - { "n", "gCO", actions.conflict_choose_all("ours"), { desc = "Choose the OURS version of a conflict for the whole file" } }, - { "n", "gCT", actions.conflict_choose_all("theirs"), { desc = "Choose the THEIRS version of a conflict for the whole file" } }, - { "n", "gCB", actions.conflict_choose_all("base"), { desc = "Choose the BASE version of a conflict for the whole file" } }, - { "n", "gCA", actions.conflict_choose_all("all"), { desc = "Choose all the versions of a conflict for the whole file" } }, - { "n", "gCX", actions.conflict_choose_all("none"), { desc = "Delete the conflict region for the whole file" } }, + { "n", prefix .. "o", actions.conflict_choose("ours"), { desc = "Choose the OURS version of a conflict" } }, + { "n", prefix .. "t", actions.conflict_choose("theirs"), { desc = "Choose the THEIRS version of a conflict" } }, + { "n", prefix .. "b", actions.conflict_choose("base"), { desc = "Choose the BASE version of a conflict" } }, + { "n", prefix .. "a", actions.conflict_choose("all"), { desc = "Choose all the versions of a conflict" } }, + { "n", prefix .. "x", actions.conflict_choose("none"), { desc = "Delete the conflict region" } }, + { "n", prefix .. "O", actions.conflict_choose_all("ours"), { desc = "Choose the OURS 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", prefix .. "B", actions.conflict_choose_all("base"), { desc = "Choose the BASE version 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", prefix .. "X", actions.conflict_choose_all("none"), { desc = "Delete the conflict region for the whole file" } }, }, --stylua: ignore file_panel = { - { "n", "gCO", actions.conflict_choose_all("ours"), { desc = "Choose the OURS version of a conflict for the whole file" } }, - { "n", "gCT", actions.conflict_choose_all("theirs"), { desc = "Choose the THEIRS version of a conflict for the whole file" } }, - { "n", "gCB", actions.conflict_choose_all("base"), { desc = "Choose the BASE version of a conflict for the whole file" } }, - { "n", "gCA", actions.conflict_choose_all("all"), { desc = "Choose all the versions of a conflict for the whole file" } }, - { "n", "gCX", actions.conflict_choose_all("none"), { desc = "Delete the conflict region 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", prefix .. "T", actions.conflict_choose_all("theirs"), { desc = "Choose the THEIRS 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", prefix .. "A", actions.conflict_choose_all("all"), { desc = "Choose all the versions of a conflict for the whole file" } }, + { "n", prefix .. "X", actions.conflict_choose_all("none"), { desc = "Delete the conflict region for the whole file" } }, }, } end, @@ -48,7 +50,7 @@ return { "folke/which-key.nvim", opts = { spec = { - { "gC", group = "conflicts", icon = " " }, + { prefix, group = "conflicts", icon = " " }, }, }, }, diff --git a/.config/nvim/lua/plugins/extras/editor/git/git-conflict.lua b/.config/nvim/lua/plugins/extras/editor/git/git-conflict.lua index b63499df..62d9f67c 100644 --- a/.config/nvim/lua/plugins/extras/editor/git/git-conflict.lua +++ b/.config/nvim/lua/plugins/extras/editor/git/git-conflict.lua @@ -1,3 +1,5 @@ +local prefix = "gC" + return { { "akinsho/git-conflict.nvim", @@ -7,10 +9,10 @@ return { version = "v1.0.0", cmd = { "GitConflictChooseTheirs", "GitConflictChooseOurs", "GitConflictChooseBoth", "GitConflictListQf" }, keys = { - { "gCt", "GitConflictChooseTheirs", desc = "Choose Their Changes" }, - { "gCo", "GitConflictChooseOurs", desc = "Choose Our Changes" }, - { "gCb", "GitConflictChooseBoth", desc = "Choose Both changes" }, - { "gCl", "GitConflictListQf", desc = "Git Conflict Quicklist" }, + { prefix .. "t", "GitConflictChooseTheirs", desc = "Choose Their Changes" }, + { prefix .. "o", "GitConflictChooseOurs", desc = "Choose Our Changes" }, + { prefix .. "b", "GitConflictChooseBoth", desc = "Choose Both changes" }, + { prefix .. "l", "GitConflictListQf", desc = "Git Conflict Quicklist" }, { "[g", "GitConflictPrevConflict", desc = "Prev Git Conflict" }, { "]g", "GitConflictPrevConflict", desc = "Next Git Conflict" }, }, @@ -19,7 +21,7 @@ return { "folke/which-key.nvim", opts = { spec = { - { "gC", group = "conflicts", icon = " " }, + { prefix, group = "conflicts", icon = " " }, }, }, }, diff --git a/.config/nvim/lua/plugins/extras/editor/git/worktree.lua b/.config/nvim/lua/plugins/extras/editor/git/worktree.lua index 9337deb1..2860ecc2 100644 --- a/.config/nvim/lua/plugins/extras/editor/git/worktree.lua +++ b/.config/nvim/lua/plugins/extras/editor/git/worktree.lua @@ -1,3 +1,5 @@ +local prefix = "gw" + return { { "ThePrimeagen/git-worktree.nvim", @@ -9,15 +11,15 @@ return { end, -- stylua: ignore keys = { - { "gwm", function() require("telescope").extensions.git_worktree.git_worktrees() end, desc = "Manage Worktrees" }, - { "gwc", function() require("telescope").extensions.git_worktree.create_git_worktree() end, desc = "Create Worktree" }, + { prefix .. "m", function() require("telescope").extensions.git_worktree.git_worktrees() end, desc = "Manage Worktrees" }, + { prefix .. "c", function() require("telescope").extensions.git_worktree.create_git_worktree() end, desc = "Create Worktree" }, }, }, { "folke/which-key.nvim", opts = { spec = { - { "gw", group = "worktrees", icon = " " }, + { prefix, group = "worktrees", icon = " " }, }, }, }, diff --git a/.config/nvim/lua/plugins/extras/editor/marks/grapple.lua b/.config/nvim/lua/plugins/extras/editor/marks/grapple.lua index fb8420a1..d839d73d 100644 --- a/.config/nvim/lua/plugins/extras/editor/marks/grapple.lua +++ b/.config/nvim/lua/plugins/extras/editor/marks/grapple.lua @@ -1,17 +1,19 @@ +local prefix = "m" + local keys = {} -- stylua: ignore start for i = 1, 9 do - table.insert(keys, { "m" .. i, "Grapple select index=" .. i .. "", desc = "File " .. i }) + table.insert(keys, { prefix .. i, "Grapple select index=" .. i .. "", desc = "File " .. i }) end -table.insert(keys, { "ma", "Grapple tag", desc = "Add Mark" }) -table.insert(keys, { "mm", "Grapple toggle_tags", desc = "Marks" }) -table.insert(keys, { "mt", "Telescope grapple tags", desc = "Marks (Telescope)" }) -table.insert(keys, { "mC", "Grapple reset", desc = "Clear all Marks" }) -table.insert(keys, { "mc", "Grapple untag", desc = "Clear Current Mark" }) -table.insert(keys, { "ms", "Grapple toggle_scopes", desc = "Scopes" }) -table.insert(keys, { "mS", "Grapple toggle_loaded", desc = "Loaded Scopes" }) +table.insert(keys, { prefix .. "a", "Grapple tag", desc = "Add Mark" }) +table.insert(keys, { prefix .. "m", "Grapple toggle_tags", desc = "Marks" }) +table.insert(keys, { prefix .. "t", "Telescope grapple tags", desc = "Marks (Telescope)" }) +table.insert(keys, { prefix .. "C", "Grapple reset", desc = "Clear all Marks" }) +table.insert(keys, { prefix .. "c", "Grapple untag", desc = "Clear Current Mark" }) +table.insert(keys, { prefix .. "s", "Grapple toggle_scopes", desc = "Scopes" }) +table.insert(keys, { prefix .. "S", "Grapple toggle_loaded", desc = "Loaded Scopes" }) table.insert(keys, { "]k", "Grapple cycle forward", desc = "Next Mark" }) table.insert(keys, { "[k", "Grapple cycle backward", desc = "Prev Mark" }) @@ -74,7 +76,7 @@ return { "folke/which-key.nvim", opts = { spec = { - { "m", group = "marks", icon = "󰛢 " }, + { prefix, group = "marks", icon = "󰛢 " }, }, }, }, diff --git a/.config/nvim/lua/plugins/extras/editor/marks/harpoon-extended.lua b/.config/nvim/lua/plugins/extras/editor/marks/harpoon-extended.lua index 8809d6d6..e2c26070 100644 --- a/.config/nvim/lua/plugins/extras/editor/marks/harpoon-extended.lua +++ b/.config/nvim/lua/plugins/extras/editor/marks/harpoon-extended.lua @@ -1,14 +1,16 @@ +local prefix = "m" + local keys = {} -- stylua: ignore start for i = 1, 9 do - table.insert(keys, { "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 -table.insert(keys, { "ma", function() require("harpoon"):list():add() end, desc = "Add Mark" }) -table.insert(keys, { "mm", function() require("harpoon").ui:toggle_quick_menu(require("harpoon"):list()) end, desc = "Marks" }) -table.insert(keys, { "mt", "Telescope harpoon marks", desc = "Marks (Telescope)" }) -table.insert(keys, { "mc", function() require("harpoon"):list():clear() end, desc = "Clear all Marks" }) +table.insert(keys, { prefix .. "a", function() require("harpoon"):list():add() end, desc = "Add Mark" }) +table.insert(keys, { prefix .. "m", function() require("harpoon").ui:toggle_quick_menu(require("harpoon"):list()) end, desc = "Marks" }) +table.insert(keys, { prefix .. "t", "Telescope harpoon marks", desc = "Marks (Telescope)" }) +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():prev() end, desc = "Prev Mark" }) @@ -101,7 +103,7 @@ return { "folke/which-key.nvim", opts = { spec = { - { "m", group = "marks", icon = "󰛢 " }, + { prefix, group = "marks", icon = "󰛢 " }, }, }, }, diff --git a/.config/nvim/lua/plugins/extras/editor/package-info.lua b/.config/nvim/lua/plugins/extras/editor/package-info.lua index 667f1d5d..2b78db3f 100644 --- a/.config/nvim/lua/plugins/extras/editor/package-info.lua +++ b/.config/nvim/lua/plugins/extras/editor/package-info.lua @@ -1,3 +1,5 @@ +local prefix = "pw" + return { { "vuki656/package-info.nvim", @@ -8,11 +10,11 @@ return { opts = {}, -- stylua: ignore keys = { - { "pwv", function() require('package-info').show({ force = true }) end, desc = "Show Package Versions" }, - { "pwu", function() require('package-info').update() end, desc = "Update Package" }, - { "pwr", function() require('package-info').delete() end, desc = "Remove Package" }, - { "pwc", function() require('package-info').change_version() end, desc = "Change Package Version" }, - { "pwi", function() require('package-info').install() end, desc = "Install New Dependency" }, + { prefix .. "v", function() require('package-info').show({ force = true }) end, desc = "Show Package Versions" }, + { prefix .. "u", function() require('package-info').update() end, desc = "Update Package" }, + { prefix .. "r", function() require('package-info').delete() end, desc = "Remove Package" }, + { prefix .. "c", function() require('package-info').change_version() end, desc = "Change Package Version" }, + { prefix .. "i", function() require('package-info').install() end, desc = "Install New Dependency" }, }, }, { @@ -20,7 +22,7 @@ return { optional = true, -- stylua: ignore keys = { - { "pwp", "FloatermNew --disposable --name=lazynpm --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd= lazynpm", desc = "Lazynpm" }, + { prefix .. "p", "FloatermNew --disposable --name=lazynpm --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd= lazynpm", desc = "Lazynpm" }, }, }, { @@ -28,7 +30,7 @@ return { opts = { spec = { { "p", group = "packages/dependencies", icon = " " }, - { "pw", group = "web", icon = "󰖟 " }, + { prefix, group = "web", icon = "󰖟 " }, }, }, }, diff --git a/.config/nvim/lua/plugins/extras/editor/rest-client.lua b/.config/nvim/lua/plugins/extras/editor/rest-client.lua index 72387cd7..2475eb74 100644 --- a/.config/nvim/lua/plugins/extras/editor/rest-client.lua +++ b/.config/nvim/lua/plugins/extras/editor/rest-client.lua @@ -1,3 +1,5 @@ +local prefix = "th" + return { { "nvim-treesitter/nvim-treesitter", @@ -52,8 +54,8 @@ return { end, -- stylua: ignore keys = { - { "thp", function() require("rest-nvim").run(true) end, desc = "Preview Request" }, - { "thr", function() require("rest-nvim").run() end, desc = "Run Request" }, + { prefix .. "p", function() require("rest-nvim").run(true) end, desc = "Preview Request" }, + { prefix .. "r", function() require("rest-nvim").run() end, desc = "Run Request" }, { "sv", function() require("telescope").extensions.rest.select_env() end, desc = "Env Files" }, }, }, @@ -61,7 +63,7 @@ return { "folke/which-key.nvim", opts = { spec = { - { "th", group = "http", icon = "󱞒 " }, + { prefix, group = "http", icon = "󱞒 " }, }, }, }, diff --git a/.config/nvim/lua/plugins/extras/editor/search-replace.lua b/.config/nvim/lua/plugins/extras/editor/search-replace.lua index 11ecd1be..89102e5f 100644 --- a/.config/nvim/lua/plugins/extras/editor/search-replace.lua +++ b/.config/nvim/lua/plugins/extras/editor/search-replace.lua @@ -1,3 +1,5 @@ +local prefix = "sr" + return { { "roobert/search-replace.nvim", @@ -7,28 +9,21 @@ return { }, -- stylua: ignore keys = { - { "srb", "SearchReplaceSingleBufferVisualSelection", desc = "Buffer", mode = "v" }, - { "srv", "SearchReplaceWithinVisualSelection", desc = "Visual Selection", mode = "v" }, - { "srw", "SearchReplaceWithinVisualSelectionCWord", desc = "Word on Buffer", mode = "v" }, + { prefix .. "b", "SearchReplaceSingleBufferVisualSelection", desc = "Buffer", mode = "v" }, + { prefix .. "v", "SearchReplaceWithinVisualSelection", desc = "Visual Selection", mode = "v" }, + { prefix .. "w", "SearchReplaceWithinVisualSelectionCWord", desc = "Word on Buffer", mode = "v" }, - { "srb", "SearchReplaceSingleBufferOpen", desc = "Buffer", mode = "n" }, - { "srw", "SearchReplaceSingleBufferCWord", desc = "Word on Buffer", mode = "n" }, - { "srW", "SearchReplaceSingleBufferCWORD", desc = "WORD on Buffer", mode = "n" }, - { "sre", "SearchReplaceSingleBufferCExpr", desc = "Expression on Buffer", mode = "n" }, - - -- { "n", "rbs", "SearchReplaceMultiBufferSelections", desc = "Search and Replace in Multi Buffer Selections" }, - -- { "n", "rbo", "SearchReplaceMultiBufferOpen", desc = "Search and Replace in Multi Buffer, Open" }, - -- { "n", "rbw", "SearchReplaceMultiBufferCWord", desc = "Search and Replace in Multi Buffer (Current Word)" }, - -- { "n", "rbW", "SearchReplaceMultiBufferCWORD", desc = "Search and Replace in Multi Buffer (Current WORD)" }, - -- { "n", "rbe", "SearchReplaceMultiBufferCExpr", desc = "Search and Replace in Multi Buffer (Current Expression)" }, - -- { "n", "rbf", "SearchReplaceMultiBufferCFile", desc = "Search and Replace in Multi Buffer (Current File)" }, + { prefix .. "b", "SearchReplaceSingleBufferOpen", desc = "Buffer", mode = "n" }, + { prefix .. "w", "SearchReplaceSingleBufferCWord", desc = "Word on Buffer", mode = "n" }, + { prefix .. "W", "SearchReplaceSingleBufferCWORD", desc = "WORD on Buffer", mode = "n" }, + { prefix .. "e", "SearchReplaceSingleBufferCExpr", desc = "Expression on Buffer", mode = "n" }, }, }, { "folke/which-key.nvim", opts = { spec = { - { "sr", group = "replace", icon = " " }, + { prefix, group = "replace", icon = " " }, }, }, }, @@ -36,7 +31,7 @@ return { "MagicDuck/grug-far.nvim", keys = { { - "srp", + prefix .. "p", function() local grug = require("grug-far") local ext = vim.bo.buftype == "" and vim.fn.expand("%:e") diff --git a/.config/nvim/lua/plugins/extras/editor/spectre.lua b/.config/nvim/lua/plugins/extras/editor/spectre.lua index 0bfb56af..c31dd433 100644 --- a/.config/nvim/lua/plugins/extras/editor/spectre.lua +++ b/.config/nvim/lua/plugins/extras/editor/spectre.lua @@ -1,3 +1,5 @@ +local prefix = "sr" + return { { "nvim-pack/nvim-spectre", @@ -17,16 +19,16 @@ return { }, -- stylua: ignore keys = { - { "srg", function() require("spectre").toggle() end, desc = "Globally" }, - { "srG", mode = { "n" }, function() require("spectre").open_visual({ select_word = true }) end, desc = "Word Globally" }, - { "srG", mode = { "v" }, function() require("spectre").open_visual() end, desc = "Word Globally" }, + { prefix .. "g", function() require("spectre").toggle() end, desc = "Globally" }, + { prefix .. "G", mode = { "n" }, function() require("spectre").open_visual({ select_word = true }) end, desc = "Word Globally" }, + { prefix .. "G", mode = { "v" }, function() require("spectre").open_visual() end, desc = "Word Globally" }, }, }, { "folke/which-key.nvim", opts = { spec = { - { "sr", group = "replace", icon = " " }, + { prefix, group = "replace", icon = " " }, }, }, }, diff --git a/.config/nvim/lua/plugins/extras/editor/telescope/telescope-extended.lua b/.config/nvim/lua/plugins/extras/editor/telescope/telescope-extended.lua index 977f75e1..70d522e9 100644 --- a/.config/nvim/lua/plugins/extras/editor/telescope/telescope-extended.lua +++ b/.config/nvim/lua/plugins/extras/editor/telescope/telescope-extended.lua @@ -1,3 +1,5 @@ +local symbols_prefix = "ss" +local symbols_workspace_prefix = "sS" local actions = require("telescope.actions") return { @@ -7,39 +9,39 @@ return { -- stylua: ignore keys = { { - "ssa", + symbols_prefix .. "a", LazyVim.pick("lsp_document_symbols", { symbols = { "Class", "Function", "Method", "Constructor", "Interface", "Module", "Struct", "Trait", "Field", "Property", "Enum", "Constant" } }), desc = "All", }, - { "ssc", LazyVim.pick("lsp_document_symbols", { symbols = { "Class" } }), desc = "Class" }, - { "ssf", LazyVim.pick("lsp_document_symbols", { symbols = { "Function" } }), desc = "Function" }, - { "ssm", LazyVim.pick("lsp_document_symbols", { symbols = { "Method" } }), desc = "Method" }, - { "ssC", LazyVim.pick("lsp_document_symbols", { symbols = { "Constructor" } }), desc = "Constructor" }, - { "sse", LazyVim.pick("lsp_document_symbols", { symbols = { "Enum" } }), desc = "Enum" }, - { "ssi", LazyVim.pick("lsp_document_symbols", { symbols = { "Interface" } }), desc = "Interface" }, - { "ssM", LazyVim.pick("lsp_document_symbols", { symbols = { "Module" } }), desc = "Module" }, - { "sss", LazyVim.pick("lsp_document_symbols", { symbols = { "Struct" } }), desc = "Struct" }, - { "sst", LazyVim.pick("lsp_document_symbols", { symbols = { "Trait" } }), desc = "Trait" }, - { "ssF", LazyVim.pick("lsp_document_symbols", { symbols = { "Field" } }), desc = "Field" }, - { "ssp", LazyVim.pick("lsp_document_symbols", { symbols = { "Property" } }), desc = "Property" }, - { "ssv", LazyVim.pick("lsp_document_symbols", { symbols = { "Variable", "Parameter" } }), desc = "Variable" }, + { symbols_prefix .. "c", LazyVim.pick("lsp_document_symbols", { symbols = { "Class" } }), desc = "Class" }, + { symbols_prefix .. "f", LazyVim.pick("lsp_document_symbols", { symbols = { "Function" } }), desc = "Function" }, + { symbols_prefix .. "m", LazyVim.pick("lsp_document_symbols", { symbols = { "Method" } }), desc = "Method" }, + { symbols_prefix .. "C", LazyVim.pick("lsp_document_symbols", { symbols = { "Constructor" } }), desc = "Constructor" }, + { symbols_prefix .. "e", LazyVim.pick("lsp_document_symbols", { symbols = { "Enum" } }), desc = "Enum" }, + { symbols_prefix .. "i", LazyVim.pick("lsp_document_symbols", { symbols = { "Interface" } }), desc = "Interface" }, + { symbols_prefix .. "M", LazyVim.pick("lsp_document_symbols", { symbols = { "Module" } }), desc = "Module" }, + { symbols_prefix .. "s", LazyVim.pick("lsp_document_symbols", { symbols = { "Struct" } }), desc = "Struct" }, + { symbols_prefix .. "t", LazyVim.pick("lsp_document_symbols", { symbols = { "Trait" } }), desc = "Trait" }, + { symbols_prefix .. "F", LazyVim.pick("lsp_document_symbols", { symbols = { "Field" } }), desc = "Field" }, + { symbols_prefix .. "p", LazyVim.pick("lsp_document_symbols", { symbols = { "Property" } }), desc = "Property" }, + { symbols_prefix .. "v", LazyVim.pick("lsp_document_symbols", { symbols = { "Variable", "Parameter" } }), desc = "Variable" }, { - "sSa", + symbols_workspace_prefix .. "a", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Class", "Function", "Method", "Constructor", "Interface", "Module", "Struct", "Trait", "Field", "Property", "Enum", "Constant" } }), desc = "All", }, - { "sSc", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Class" } }), desc = "Class" }, - { "sSf", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Function" } }), desc = "Function" }, - { "sSm", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Method" } }), desc = "Method" }, - { "sSC", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Constructor" } }), desc = "Constructor" }, - { "sSe", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Enum" } }), desc = "Enum" }, - { "sSi", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Interface" } }), desc = "Interface" }, - { "sSM", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Module" } }), desc = "Module" }, - { "sSs", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Struct" } }), desc = "Struct" }, - { "sSt", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Trait" } }), desc = "Trait" }, - { "sSF", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Field" } }), desc = "Field" }, - { "sSp", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Property" } }), desc = "Property" }, - { "sSv", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Variable", "Parameter" } }), desc = "Variable" }, + { symbols_workspace_prefix .. "c", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Class" } }), desc = "Class" }, + { symbols_workspace_prefix .. "f", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Function" } }), desc = "Function" }, + { symbols_workspace_prefix .. "m", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Method" } }), desc = "Method" }, + { symbols_workspace_prefix .. "C", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Constructor" } }), desc = "Constructor" }, + { symbols_workspace_prefix .. "e", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Enum" } }), desc = "Enum" }, + { symbols_workspace_prefix .. "i", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Interface" } }), desc = "Interface" }, + { symbols_workspace_prefix .. "M", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Module" } }), desc = "Module" }, + { symbols_workspace_prefix .. "s", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Struct" } }), desc = "Struct" }, + { symbols_workspace_prefix .. "t", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Trait" } }), desc = "Trait" }, + { symbols_workspace_prefix .. "F", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Field" } }), desc = "Field" }, + { symbols_workspace_prefix .. "p", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Property" } }), desc = "Property" }, + { symbols_workspace_prefix .. "v", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Variable", "Parameter" } }), desc = "Variable" }, { "sA", LazyVim.pick("treesitter"), desc = "Treesitter Symbols" }, { "sP", "Telescope builtin", desc = "Pickers (Telescope)" }, { "fh", LazyVim.pick("find_files", { hidden = true }), desc = "Find Files (hidden)" }, @@ -117,8 +119,8 @@ return { "folke/which-key.nvim", opts = { spec = { - { "ss", group = "goto symbols", icon = " " }, - { "sS", group = "goto symbols (Workspace)", icon = " " }, + { symbols_prefix, group = "goto symbols", icon = " " }, + { symbols_workspace_prefix, group = "goto symbols (Workspace)", icon = " " }, }, }, }, diff --git a/.config/nvim/lua/plugins/extras/lang/python-extended.lua b/.config/nvim/lua/plugins/extras/lang/python-extended.lua index d6203d75..e5805387 100644 --- a/.config/nvim/lua/plugins/extras/lang/python-extended.lua +++ b/.config/nvim/lua/plugins/extras/lang/python-extended.lua @@ -1,3 +1,5 @@ +local package_prefix = "pp" + -- LSP Server to use for Python. -- Set to "basedpyright" to use basedpyright instead of pyright. vim.g.lazyvim_python_lsp = "basedpyright" @@ -85,9 +87,9 @@ return { opts = {}, -- stylua: ignore keys = { - { "ppu", function() require("py-requirements").upgrade() end, desc = "Update Package" }, - { "ppi", function() require("py-requirements").show_description() end, desc = "Package Info" }, - { "ppa", function() require("py-requirements").upgrade_all() end, desc = "Update All Packages" }, + { package_prefix .. "u", function() require("py-requirements").upgrade() end, desc = "Update Package" }, + { package_prefix .. "i", function() require("py-requirements").show_description() end, desc = "Package Info" }, + { package_prefix .. "a", function() require("py-requirements").upgrade_all() end, desc = "Update All Packages" }, }, }, { @@ -95,7 +97,7 @@ return { opts = { spec = { { "p", group = "packages/dependencies", icon = " " }, - { "pp", group = "python", icon = " " }, + { package_prefix, group = "python", icon = " " }, }, }, }, diff --git a/.config/nvim/lua/plugins/extras/lang/rust-extended.lua b/.config/nvim/lua/plugins/extras/lang/rust-extended.lua index 70764492..e7e05f49 100644 --- a/.config/nvim/lua/plugins/extras/lang/rust-extended.lua +++ b/.config/nvim/lua/plugins/extras/lang/rust-extended.lua @@ -1,3 +1,5 @@ +local package_prefix = "pr" + return { { import = "lazyvim.plugins.extras.lang.rust" }, { @@ -15,23 +17,23 @@ return { "Saecki/crates.nvim", -- stylua: ignore keys = { - { "prR", function() require("crates").reload() end, desc = "Reload" }, + { package_prefix .. "R", function() require("crates").reload() end, desc = "Reload" }, - { "pru", function() require("crates").update_crate() end, desc = "Update Crate" }, - { "pru", mode = "v", function() require("crates").update_crates() end, desc = "Update Crates" }, - { "pra", function() require("crates").update_all_crates() end, desc = "Update All Crates" }, + { package_prefix .. "u", function() require("crates").update_crate() end, desc = "Update Crate" }, + { package_prefix .. "u", mode = "v", function() require("crates").update_crates() end, desc = "Update Crates" }, + { package_prefix .. "a", function() require("crates").update_all_crates() end, desc = "Update All Crates" }, - { "prU", function() require("crates").upgrade_crate() end, desc = "Upgrade Crate" }, - { "prU", mode = "v", function() require("crates").upgrade_crates() end, desc = "Upgrade Crates" }, - { "prA", function() require("crates").upgrade_all_crates() end, desc = "Upgrade All Crates" }, + { package_prefix .. "U", function() require("crates").upgrade_crate() end, desc = "Upgrade Crate" }, + { package_prefix .. "U", mode = "v", function() require("crates").upgrade_crates() end, desc = "Upgrade Crates" }, + { package_prefix .. "A", function() require("crates").upgrade_all_crates() end, desc = "Upgrade All Crates" }, - { "prt", function() require("crates").expand_plain_crate_to_inline_table() end, desc = "Extract into Inline Table" }, - { "prT", function() require("crates").extract_crate_into_table() end, desc = "Extract into Table" }, + { package_prefix .. "t", function() require("crates").expand_plain_crate_to_inline_table() end, desc = "Extract into Inline Table" }, + { package_prefix .. "T", function() require("crates").extract_crate_into_table() end, desc = "Extract into Table" }, - { "prh", function() require("crates").open_homepage() end, desc = "Homepage" }, - { "prr", function() require("crates").open_repository() end, desc = "Repo" }, - { "prd", function() require("crates").open_documentation() end, desc = "Documentation" }, - { "prc", function() require("crates").open_crates_io() end, desc = "Crates.io" }, + { package_prefix .. "h", function() require("crates").open_homepage() end, desc = "Homepage" }, + { package_prefix .. "r", function() require("crates").open_repository() end, desc = "Repo" }, + { package_prefix .. "d", function() require("crates").open_documentation() end, desc = "Documentation" }, + { package_prefix .. "c", function() require("crates").open_crates_io() end, desc = "Crates.io" }, }, }, { @@ -39,7 +41,7 @@ return { opts = { spec = { { "p", group = "packages/dependencies", icon = " " }, - { "pr", group = "rust", icon = " " }, + { package_prefix, group = "rust", icon = " " }, }, }, }, diff --git a/.config/nvim/lua/plugins/extras/lang/sql-extended.lua b/.config/nvim/lua/plugins/extras/lang/sql-extended.lua index 95a56cf6..27f38d1c 100644 --- a/.config/nvim/lua/plugins/extras/lang/sql-extended.lua +++ b/.config/nvim/lua/plugins/extras/lang/sql-extended.lua @@ -1,4 +1,5 @@ local sql_ft = { "sql", "mysql", "plsql" } +local prefix = "D" return { { import = "lazyvim.plugins.extras.lang.python" }, @@ -8,18 +9,18 @@ return { { "jsborjesson/vim-uppercase-sql", ft = sql_ft }, }, keys = { - { "Da", "DBUIAddConnection", desc = "Add Connection" }, - { "Du", "DBUIToggle", desc = "Toggle UI" }, - { "Df", "DBUIFindBuffer", desc = "Find Buffer" }, - { "Dr", "DBUIRenameBuffer", desc = "Rename Buffer" }, - { "Dq", "DBUILastQueryInfo", desc = "Last Query Info" }, + { prefix .. "a", "DBUIAddConnection", desc = "Add Connection" }, + { prefix .. "u", "DBUIToggle", desc = "Toggle UI" }, + { prefix .. "f", "DBUIFindBuffer", desc = "Find Buffer" }, + { prefix .. "r", "DBUIRenameBuffer", desc = "Rename Buffer" }, + { prefix .. "q", "DBUILastQueryInfo", desc = "Last Query Info" }, }, }, { "folke/which-key.nvim", opts = { spec = { - { "D", group = "database", icon = " " }, + { prefix, group = "database", icon = " " }, }, }, }, diff --git a/.config/nvim/lua/plugins/extras/lsp/lspconfig-extended.lua b/.config/nvim/lua/plugins/extras/lsp/lspconfig-extended.lua index 0d8c6c4f..0121fbd9 100644 --- a/.config/nvim/lua/plugins/extras/lsp/lspconfig-extended.lua +++ b/.config/nvim/lua/plugins/extras/lsp/lspconfig-extended.lua @@ -1,4 +1,5 @@ local nvim_0_10 = vim.fn.has("nvim-0.10") +local prefix = "cl" return { { @@ -8,13 +9,13 @@ return { keys[#keys + 1] = { "cl", false } keys[#keys + 1] = { "cil", "LspInfo", desc = "Lsp" } - keys[#keys + 1] = { "clr", "LspRestart", desc = "Restart Lsp" } - keys[#keys + 1] = { "cls", "LspStart", desc = "Start Lsp" } - keys[#keys + 1] = { "clS", "LspStop", desc = "Stop Lsp" } + keys[#keys + 1] = { prefix .. "r", "LspRestart", desc = "Restart Lsp" } + keys[#keys + 1] = { prefix .. "s", "LspStart", desc = "Start Lsp" } + keys[#keys + 1] = { prefix .. "S", "LspStop", desc = "Stop Lsp" } -- stylua: ignore start - keys[#keys + 1] = { "clr", function() vim.lsp.buf.remove_workspace_folder() end, desc = "Remove workspace" } - keys[#keys + 1] = { "cla", function() vim.lsp.buf.add_workspace_folder() end, desc = "Add workspace" } + keys[#keys + 1] = { prefix .. "r", function() vim.lsp.buf.remove_workspace_folder() end, desc = "Remove workspace" } + keys[#keys + 1] = { prefix .. "a", function() vim.lsp.buf.add_workspace_folder() end, desc = "Add workspace" } -- stylua: ignore end end, opts = { @@ -58,7 +59,7 @@ return { "folke/which-key.nvim", opts = { spec = { - { "cL", group = "lsp", icon = " " }, + { "cl", group = "lsp", icon = " " }, }, }, }, diff --git a/.config/nvim/lua/plugins/extras/ui/comment-box.lua b/.config/nvim/lua/plugins/extras/ui/comment-box.lua index de8d0f74..1e1ac76d 100644 --- a/.config/nvim/lua/plugins/extras/ui/comment-box.lua +++ b/.config/nvim/lua/plugins/extras/ui/comment-box.lua @@ -1,23 +1,25 @@ +local prefix = "ac" + return { { "LudoPinelli/comment-box.nvim", opts = {}, vscode = true, keys = { - { "acb", "CBccbox", mode = { "n", "v" }, desc = "Comment Box" }, - { "act", "CBllline", mode = { "n", "v" }, desc = "Tiled Line" }, - { "acl", "CBline", desc = "Line" }, - { "acm", "CBllbox14", mode = { "n", "v" }, desc = "Marked" }, - { "acc", "CBcatalog", desc = "Catalog" }, - { "acd", "CBd", mode = { "n", "v" }, desc = "Delete Comment Style" }, + { prefix .. "b", "CBccbox", mode = { "n", "v" }, desc = "Comment Box" }, + { prefix .. "t", "CBllline", mode = { "n", "v" }, desc = "Tiled Line" }, + { prefix .. "l", "CBline", desc = "Line" }, + { prefix .. "m", "CBllbox14", mode = { "n", "v" }, desc = "Marked" }, + { prefix .. "c", "CBcatalog", desc = "Catalog" }, + { prefix .. "d", "CBd", mode = { "n", "v" }, desc = "Delete Comment Style" }, }, }, { "folke/which-key.nvim", opts = { spec = { - { "a", group = "annotation/snippets", icon = " " }, - { "ac", group = "comments", icon = " " }, + { "A", group = "annotation/snippets", icon = " " }, + { prefix, group = "comments", icon = " " }, }, }, }, diff --git a/.config/nvim/lua/plugins/extras/util/icon-picker.lua b/.config/nvim/lua/plugins/extras/util/icon-picker.lua index 49d66d08..ead3cd07 100644 --- a/.config/nvim/lua/plugins/extras/util/icon-picker.lua +++ b/.config/nvim/lua/plugins/extras/util/icon-picker.lua @@ -1,3 +1,5 @@ +local prefix = "si" + return { { "ziontee113/icon-picker.nvim", @@ -9,17 +11,17 @@ return { }, -- stylua: ignore keys = { - { "sia", "IconPickerNormal", desc = "All" }, - { "sis", "IconPickerNormal symbols", desc = "Symbols" }, - { "sie", "IconPickerNormal emoji", desc = "Emoji" }, - { "sin", "IconPickerNormal nerd_font_v3", desc = "Nerd Fonts" }, + { prefix .. "a", "IconPickerNormal", desc = "All" }, + { prefix .. "s", "IconPickerNormal symbols", desc = "Symbols" }, + { prefix .. "e", "IconPickerNormal emoji", desc = "Emoji" }, + { prefix .. "n", "IconPickerNormal nerd_font_v3", desc = "Nerd Fonts" }, }, }, { "folke/which-key.nvim", opts = { spec = { - { "si", group = "icons", icon = " " }, + { prefix, group = "icons", icon = " " }, }, }, },