diff --git a/lua/config/keymaping.lua b/lua/config/keymaping.lua index dde23c8..dca36dc 100644 --- a/lua/config/keymaping.lua +++ b/lua/config/keymaping.lua @@ -8,5 +8,16 @@ map("n", "g", ":Neotree git_status float", { desc = "open gis status map("n", "ff", ":Telescope live_grep", { desc = "telescope live grep" }) map("n", "r", ":Telescope lsp_references", { desc = "telescope lsp references" }) +-- barbar map("n", "", ":BufferNext", { desc = "Next tab" }) map("n", "", ":BufferPrevious", { desc = "Previous tab" }) + +-- menu +local menu = require("menu") + +map("n", "", function() + local ft = vim.bo.ft + if ft ~= "neo-tree" then + menu.open(require("config.menu"), { border = true }) + end +end) diff --git a/lua/config/menu.lua b/lua/config/menu.lua new file mode 100644 index 0000000..cf0eb99 --- /dev/null +++ b/lua/config/menu.lua @@ -0,0 +1,25 @@ +local gitsigns = require("gitsigns") + +return { + { + name = " Preview change", + cmd = gitsigns.preview_hunk, + -- rtxt = "", + }, + + { + name = "󰗨 Rest change", + cmd = gitsigns.reset_hunk, + -- rtxt = "", + }, + + { + name = " Toggle blame", + cmd = gitsigns.toggle_current_line_blame, + }, + + { + name = "󰚃 Toggle delete", + cmd = gitsigns.toggle_deleted, + }, +} diff --git a/lua/plugins/lazygit.lua b/lua/plugins/lazygit.lua new file mode 100644 index 0000000..e42721c --- /dev/null +++ b/lua/plugins/lazygit.lua @@ -0,0 +1,20 @@ +return { + "kdheepak/lazygit.nvim", + lazy = true, + cmd = { + "LazyGit", + "LazyGitConfig", + "LazyGitCurrentFile", + "LazyGitFilter", + "LazyGitFilterCurrentFile", + }, + -- optional for floating window border decoration + dependencies = { + "nvim-lua/plenary.nvim", + }, + -- setting the keybinding for LazyGit with 'keys' is recommended in + -- order to load the plugin when the command is run for the first time + keys = { + { "lg", "LazyGit", desc = "LazyGit" }, + }, +} diff --git a/lua/plugins/menu.lua b/lua/plugins/menu.lua new file mode 100644 index 0000000..969aa9e --- /dev/null +++ b/lua/plugins/menu.lua @@ -0,0 +1,8 @@ +return { + "nvzone/menu", + lazy = true, + config = function() end, + dependencies = { + { "nvzone/volt", lazy = true }, + }, +}