2024-11-04 21:29:25 +07:00
|
|
|
return {
|
2024-11-06 12:22:10 +07:00
|
|
|
{
|
2025-06-11 21:13:56 +07:00
|
|
|
"nvzone/menu",
|
2024-11-06 12:22:10 +07:00
|
|
|
lazy = true,
|
|
|
|
event = { "VeryLazy" },
|
|
|
|
dependencies = {
|
2025-06-11 21:13:56 +07:00
|
|
|
{ "nvzone/volt", lazy = true },
|
|
|
|
{ "nvzone/showkeys", cmd = "ShowkeysToggle", lazy = true },
|
2024-11-06 12:22:10 +07:00
|
|
|
{
|
2025-06-11 21:13:56 +07:00
|
|
|
"nvzone/minty",
|
2024-11-06 12:22:10 +07:00
|
|
|
cmd = { "Shades", "Huefy" },
|
|
|
|
lazy = true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
opts = {
|
|
|
|
mouse = true,
|
|
|
|
border = true,
|
|
|
|
},
|
|
|
|
config = function(_, opts)
|
|
|
|
-- Keyboard users
|
|
|
|
vim.keymap.set("n", "<C-t>", function()
|
|
|
|
require("menu").open("default")
|
|
|
|
end, {})
|
2024-11-04 21:29:25 +07:00
|
|
|
|
2024-11-06 12:22:10 +07:00
|
|
|
-- mouse users + nvimtree users!
|
2025-06-11 21:13:56 +07:00
|
|
|
vim.keymap.set({ "n", "v" }, "<RightMouse>", function()
|
|
|
|
require("menu.utils").delete_old_menus()
|
2024-11-06 12:22:10 +07:00
|
|
|
vim.cmd.exec('"normal! \\<RightMouse>"')
|
2024-11-04 21:29:25 +07:00
|
|
|
|
2025-06-11 21:13:56 +07:00
|
|
|
local buf = vim.api.nvim_win_get_buf(vim.fn.getmousepos().winid)
|
|
|
|
local options = vim.bo[buf].ft == "NvimTree" and "nvimtree" or "default"
|
2024-11-06 12:22:10 +07:00
|
|
|
require("menu").open(options, opts)
|
|
|
|
end, {})
|
|
|
|
end,
|
|
|
|
},
|
2024-11-04 21:29:25 +07:00
|
|
|
}
|