feat(nvim): new extras: showkeys and arena

This commit is contained in:
Sergio Laín 2024-10-28 10:05:50 +01:00
parent b57c85169a
commit 667047ed6e
No known key found for this signature in database
GPG key ID: 51BB28D8B42FB438
2 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1,43 @@
return {
{
"dzfrias/arena.nvim",
event = "BufWinEnter",
opts = {
per_project = true,
devicons = true,
},
-- stylua: ignore
keys = {
{ "<leader>m", function() require("arena").toggle() end, desc = "Marks" },
},
},
{
"goolord/alpha-nvim",
optional = true,
opts = function(_, dashboard)
-- stylua: ignore
local button = dashboard.button("m", "󰛢 " .. " Marks", function() require("arena").toggle() end)
button.opts.hl = "AlphaButtons"
button.opts.hl_shortcut = "AlphaShortcut"
table.insert(dashboard.section.buttons.val, 5, button)
end,
},
{
"nvimdev/dashboard-nvim",
optional = true,
opts = function(_, opts)
-- stylua: ignore
local arrow = {
action = function() require("arena").toggle() end,
desc = " Marks",
icon = "󰛢 ",
key = "m",
}
arrow.desc = arrow.desc .. string.rep(" ", 43 - #arrow.desc)
arrow.key_format = " %s"
table.insert(opts.config.center, 5, arrow)
end,
},
}

View file

@ -0,0 +1,8 @@
return {
"nvchad/showkeys",
cmd = "ShowkeysToggle",
opts = {
timeout = 1,
maxkeys = 8,
},
}