add menu and lazygit
This commit is contained in:
parent
d9272a2cfe
commit
9b6cac6a82
@ -8,5 +8,16 @@ map("n", "<leader>g", ":Neotree git_status float<CR>", { desc = "open gis status
|
||||
map("n", "<leader>ff", ":Telescope live_grep<CR>", { desc = "telescope live grep" })
|
||||
map("n", "<leader>r", ":Telescope lsp_references<CR>", { desc = "telescope lsp references" })
|
||||
|
||||
-- barbar
|
||||
map("n", "<tab>", ":BufferNext<CR>", { desc = "Next tab" })
|
||||
map("n", "<S-tab>", ":BufferPrevious<CR>", { desc = "Previous tab" })
|
||||
|
||||
-- menu
|
||||
local menu = require("menu")
|
||||
|
||||
map("n", "<A-CR>", function()
|
||||
local ft = vim.bo.ft
|
||||
if ft ~= "neo-tree" then
|
||||
menu.open(require("config.menu"), { border = true })
|
||||
end
|
||||
end)
|
||||
|
25
lua/config/menu.lua
Normal file
25
lua/config/menu.lua
Normal file
@ -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,
|
||||
},
|
||||
}
|
20
lua/plugins/lazygit.lua
Normal file
20
lua/plugins/lazygit.lua
Normal file
@ -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 = {
|
||||
{ "<leader>lg", "<cmd>LazyGit<cr>", desc = "LazyGit" },
|
||||
},
|
||||
}
|
8
lua/plugins/menu.lua
Normal file
8
lua/plugins/menu.lua
Normal file
@ -0,0 +1,8 @@
|
||||
return {
|
||||
"nvzone/menu",
|
||||
lazy = true,
|
||||
config = function() end,
|
||||
dependencies = {
|
||||
{ "nvzone/volt", lazy = true },
|
||||
},
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user