From 54ccd837a9b44121e872726d19e49938f3cae5af Mon Sep 17 00:00:00 2001 From: Pojok Code Date: Sat, 2 Nov 2024 14:10:32 +0700 Subject: [PATCH] enc: add nvim menu and colorpicker option --- lazy-lock.json | 9 ++++++--- lua/custom/default.lua | 2 +- lua/plugins/nvimmenu.lua | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 lua/plugins/nvimmenu.lua diff --git a/lazy-lock.json b/lazy-lock.json index e0b700c..f6ded06 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -26,15 +26,17 @@ "lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" }, "live-server.nvim": { "branch": "main", "commit": "5fc8abb727827a09d0ce1b7757d0a4c7b5802b09" }, "lsp-progress.nvim": { "branch": "main", "commit": "d5f4d28efe75ce636bfbe271eb45f39689765aab" }, - "lualine.nvim": { "branch": "master", "commit": "b39f1f02f1799da88d552c522f4cb0c786b14440" }, + "lualine.nvim": { "branch": "master", "commit": "640260d7c2d98779cab89b1e7088ab14ea354a02" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" }, "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, + "menu": { "branch": "main", "commit": "9269d8ff5775bb1b9b9cad538d1bcd13fa105fe7" }, "mini.indentscope": { "branch": "main", "commit": "da9af64649e114aa79480c238fd23f6524bc0903" }, + "minty": { "branch": "main", "commit": "6e5c4cfc66e5dbb248ab78293d1c147de0c33a54" }, "neoscroll.nvim": { "branch": "master", "commit": "a731f66f1d39ec6175fd201c5bf849e54abda99c" }, "noice.nvim": { "branch": "main", "commit": "df448c649ef6bc5a6a633a44f2ad0ed8d4442499" }, "nui.nvim": { "branch": "main", "commit": "a0fd35fcbb4cb479366f1dc5f20145fd718a3733" }, "nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" }, - "nvim-cmp": { "branch": "main", "commit": "29fb4854573355792df9e156cb779f0d31308796" }, + "nvim-cmp": { "branch": "main", "commit": "f17d9b4394027ff4442b298398dfcaab97e40c4f" }, "nvim-colorizer.lua": { "branch": "master", "commit": "0671e0eabc6842676d3310370e8fae4e1c51d7f9" }, "nvim-lint": { "branch": "master", "commit": "36da8dd0ddc4f88e0beae234c20e75397326f143" }, "nvim-lspconfig": { "branch": "master", "commit": "056f569f71e4b726323b799b9cfacc53653bceb3" }, @@ -43,7 +45,7 @@ "nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" }, "nvim-scrollview": { "branch": "main", "commit": "bc37a942debe191fffd072f0f1f2ec7c56c54b17" }, "nvim-tree.lua": { "branch": "master", "commit": "4a9e82d10a3715d0c3845e1d2f66ddfb8b711253" }, - "nvim-treesitter": { "branch": "master", "commit": "b065b59196edb10a7c29bfbed88cc225b7e3de37" }, + "nvim-treesitter": { "branch": "master", "commit": "38c12cb9ac8e1c547a8472c87df9e9d7c8b1af0d" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "3e450cd85243da99dc23ebbf14f9c70e9a0c26a4" }, "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "9c74db656c3d0b1c4392fc89a016b1910539e7c0" }, @@ -59,6 +61,7 @@ "vim-startuptime": { "branch": "master", "commit": "97a88e688482a09c3c4b777d07b509b328a5ec29" }, "vim-visual-multi": { "branch": "master", "commit": "a6975e7c1ee157615bbc80fc25e4392f71c344d4" }, "virt-column.nvim": { "branch": "master", "commit": "b62b4ef0774d19452d4ed18e473e824c7a756f2f" }, + "volt": { "branch": "main", "commit": "4472da2e77ad240e7fc56af6357b2a8fdf6aa0ae" }, "which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" }, "yanky.nvim": { "branch": "main", "commit": "9268018e92d02650a94e39dd5f5903c542f7ea11" } } diff --git a/lua/custom/default.lua b/lua/custom/default.lua index d3aa42a..5a8387d 100644 --- a/lua/custom/default.lua +++ b/lua/custom/default.lua @@ -104,7 +104,7 @@ pcode.coderunner = { -- https://github.com/nvim-tree/nvim-tree.lua -- 0 = normal -- 1 = float -pcode.nvimtree_isfloat = 1 +pcode.nvimtree_isfloat = 0 -- https://github.com/roobert/tailwindcss-colorizer-cmp.nvim pcode.tailwindcolorizer = false diff --git a/lua/plugins/nvimmenu.lua b/lua/plugins/nvimmenu.lua new file mode 100644 index 0000000..a9dbf00 --- /dev/null +++ b/lua/plugins/nvimmenu.lua @@ -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", "", function() + require("menu").open("default") + end, {}) + + -- mouse users + nvimtree users! + vim.keymap.set("n", "", function() + vim.cmd.exec('"normal! \\"') + + local options = vim.bo.ft == "NvimTree" and "nvimtree" or "default" + require("menu").open(options, opts) + end, {}) + end, + }, +}