♻️ refactor(nvim): harpoon now on main page in which-key, as well as revamped some bindings and added others
This commit is contained in:
parent
25324f18d2
commit
4a8a7cb912
1 changed files with 26 additions and 15 deletions
|
@ -3,17 +3,20 @@ return {
|
||||||
"ThePrimeagen/harpoon",
|
"ThePrimeagen/harpoon",
|
||||||
--stylua: ignore
|
--stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>fa", function() require("harpoon.mark").add_file() end, desc = "Add File to Harpoon" },
|
{ "<leader>ha", function() require("harpoon.mark").add_file() end, desc = "Add Mark" },
|
||||||
{ "<leader>fm", "<cmd>Telescope harpoon marks<CR>", desc = "Marks" },
|
{ "<leader>hh", function() require("harpoon.ui").toggle_quick_menu() end, desc = "Menu" },
|
||||||
{ "<leader>1", function() require("harpoon.ui").nav_file(1) end, desc = "File 1" },
|
{ "<leader>hf", "<cmd>Telescope harpoon marks<CR>", desc = "Files" },
|
||||||
{ "<leader>2", function() require("harpoon.ui").nav_file(2) end, desc = "File 2" },
|
{ "<leader>h1", function() require("harpoon.ui").nav_file(1) end, desc = "File 1" },
|
||||||
{ "<leader>3", function() require("harpoon.ui").nav_file(3) end, desc = "File 3" },
|
{ "<leader>h2", function() require("harpoon.ui").nav_file(2) end, desc = "File 2" },
|
||||||
{ "<leader>4", function() require("harpoon.ui").nav_file(4) end, desc = "File 4" },
|
{ "<leader>h3", function() require("harpoon.ui").nav_file(3) end, desc = "File 3" },
|
||||||
{ "<leader>5", function() require("harpoon.ui").nav_file(5) end, desc = "File 5" },
|
{ "<leader>h4", function() require("harpoon.ui").nav_file(4) end, desc = "File 4" },
|
||||||
{ "<leader>6", function() require("harpoon.ui").nav_file(6) end, desc = "File 6" },
|
{ "<leader>h5", function() require("harpoon.ui").nav_file(5) end, desc = "File 5" },
|
||||||
{ "<leader>7", function() require("harpoon.ui").nav_file(7) end, desc = "File 7" },
|
{ "<leader>h6", function() require("harpoon.ui").nav_file(6) end, desc = "File 6" },
|
||||||
{ "<leader>8", function() require("harpoon.ui").nav_file(8) end, desc = "File 8" },
|
{ "<leader>h7", function() require("harpoon.ui").nav_file(7) end, desc = "File 7" },
|
||||||
{ "<leader>9", function() require("harpoon.ui").nav_file(9) end, desc = "File 9" },
|
{ "<leader>h8", function() require("harpoon.ui").nav_file(8) end, desc = "File 8" },
|
||||||
|
{ "<leader>h9", function() require("harpoon.ui").nav_file(9) end, desc = "File 9" },
|
||||||
|
{ "]H", function() require("harpoon.ui").nav_next() end, desc = "Next Harpoon File" },
|
||||||
|
{ "[H", function() require("harpoon.ui").nav_prev() end, desc = "Prev Harpoon File" },
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
globalsettings = {
|
globalsettings = {
|
||||||
|
@ -31,7 +34,7 @@ return {
|
||||||
"goolord/alpha-nvim",
|
"goolord/alpha-nvim",
|
||||||
optional = true,
|
optional = true,
|
||||||
opts = function(_, dashboard)
|
opts = function(_, dashboard)
|
||||||
local button = dashboard.button("m", " " .. " Marks", "<cmd>Telescope harpoon marks<CR>")
|
local button = dashboard.button("h", " " .. " Harpoon", "<cmd>Telescope harpoon marks<CR>")
|
||||||
button.opts.hl = "AlphaButtons"
|
button.opts.hl = "AlphaButtons"
|
||||||
button.opts.hl_shortcut = "AlphaShortcut"
|
button.opts.hl_shortcut = "AlphaShortcut"
|
||||||
table.insert(dashboard.section.buttons.val, 5, button)
|
table.insert(dashboard.section.buttons.val, 5, button)
|
||||||
|
@ -43,9 +46,9 @@ return {
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
local harpoon = {
|
local harpoon = {
|
||||||
action = "Telescope harpoon marks",
|
action = "Telescope harpoon marks",
|
||||||
desc = " Marks",
|
desc = " Harpoon",
|
||||||
icon = " ",
|
icon = " ",
|
||||||
key = "m",
|
key = "h",
|
||||||
}
|
}
|
||||||
|
|
||||||
harpoon.desc = harpoon.desc .. string.rep(" ", 43 - #harpoon.desc)
|
harpoon.desc = harpoon.desc .. string.rep(" ", 43 - #harpoon.desc)
|
||||||
|
@ -54,4 +57,12 @@ return {
|
||||||
table.insert(opts.config.center, 5, harpoon)
|
table.insert(opts.config.center, 5, harpoon)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"folke/which-key.nvim",
|
||||||
|
opts = {
|
||||||
|
defaults = {
|
||||||
|
["<leader>h"] = { name = "+ harpoon" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue