From a5180fa81c4dc8afcea94b584f4ab00714ef25bd Mon Sep 17 00:00:00 2001 From: aminnairi <18418459+aminnairi@users.noreply.github.com> Date: Mon, 4 Dec 2023 19:13:45 +0100 Subject: [PATCH] added keymaps for neogit --- nvim/lua/settings/lazy/plugins/neogit.lua | 25 ++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/nvim/lua/settings/lazy/plugins/neogit.lua b/nvim/lua/settings/lazy/plugins/neogit.lua index bc38ad5..a67fe65 100644 --- a/nvim/lua/settings/lazy/plugins/neogit.lua +++ b/nvim/lua/settings/lazy/plugins/neogit.lua @@ -7,5 +7,28 @@ return { "sindrets/diffview.nvim", -- optional "ibhagwan/fzf-lua", -- optional }, - config = true + config = function() + local whichKey = require("which-key") + local neogit = require("neogit") + + neogit.setup({}) + + whichKey.register({ + ["g"] = { + name = "Neogit", + g = { + function() + neogit.open() + end, + "Open Neogit" + }, + c = { + function() + neogit.open({ "commit" }) + end, + "Open Neogit commit" + } + } + }) + end }