enc: add nvim menu and colorpicker option

This commit is contained in:
Pojok Code 2024-11-02 14:10:32 +07:00
parent c8bc3339ea
commit 54ccd837a9
3 changed files with 40 additions and 4 deletions

33
lua/plugins/nvimmenu.lua Normal file
View file

@ -0,0 +1,33 @@
return {
{
"nvchad/menu",
lazy = true,
event = { "VeryLazy" },
dependencies = {
{ "nvchad/volt", lazy = true },
{
"nvchad/minty",
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, {})
-- mouse users + nvimtree users!
vim.keymap.set("n", "<RightMouse>", function()
vim.cmd.exec('"normal! \\<RightMouse>"')
local options = vim.bo.ft == "NvimTree" and "nvimtree" or "default"
require("menu").open(options, opts)
end, {})
end,
},
}