From 91b6afde80ae618203234edf4adbc77f144d33e3 Mon Sep 17 00:00:00 2001 From: u2515h Date: Sun, 21 Jan 2024 12:23:44 +0100 Subject: [PATCH] feat(nvim/neogit): enable interation, add default mappings --- init.lua | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/init.lua b/init.lua index 611f962..b8fdabd 100644 --- a/init.lua +++ b/init.lua @@ -39,6 +39,92 @@ neogit.setup({ ["gitlab.com"] = "https://gitlab.com/${owner}/${repository}/merge_requests/new?merge_request[source_branch]=${branch_name}", ["apps.terminal"] = "http://apps.terminal/${owner}/${repository}/merge_requests/new?merge_request[source_branch]=${branch_name}" } + status = { + recent_commit_count = 100, + }, + integrations = { + diffview = true, + telescope = true, + fzf_lua = true, + }, + mappings = { + commit_editor = { + ["q"] = "Close", + [""] = "Submit", + [""] = "Abort", + }, + rebase_editor = { + ["p"] = "Pick", + ["r"] = "Reword", + ["e"] = "Edit", + ["s"] = "Squash", + ["f"] = "Fixup", + ["x"] = "Execute", + ["d"] = "Drop", + ["b"] = "Break", + ["q"] = "Close", + [""] = "OpenCommit", + ["gk"] = "MoveUp", + ["gj"] = "MoveDown", + [""] = "Submit", + [""] = "Abort", + }, + finder = { + [""] = "Select", + [""] = "Close", + [""] = "Close", + [""] = "Next", + [""] = "Previous", + [""] = "Next", + [""] = "Previous", + [""] = "MultiselectToggleNext", + [""] = "MultiselectTogglePrevious", + [""] = "NOP", + }, + -- Setting any of these to `false` will disable the mapping. + popup = { + ["?"] = "HelpPopup", + ["A"] = "CherryPickPopup", + ["D"] = "DiffPopup", + ["M"] = "RemotePopup", + ["P"] = "PushPopup", + ["X"] = "ResetPopup", + ["Z"] = "StashPopup", + ["b"] = "BranchPopup", + ["c"] = "CommitPopup", + ["f"] = "FetchPopup", + ["l"] = "LogPopup", + ["m"] = "MergePopup", + ["p"] = "PullPopup", + ["r"] = "RebasePopup", + ["v"] = "RevertPopup", + }, + status = { + ["q"] = "Close", + ["I"] = "InitRepo", + ["1"] = "Depth1", + ["2"] = "Depth2", + ["3"] = "Depth3", + ["4"] = "Depth4", + [""] = "Toggle", + ["x"] = "Discard", + ["s"] = "Stage", + ["S"] = "StageUnstaged", + [""] = "StageAll", + ["u"] = "Unstage", + ["U"] = "UnstageStaged", + ["$"] = "CommandHistory", + ["#"] = "Console", + ["Y"] = "YankSelected", + [""] = "RefreshBuffer", + [""] = "GoToFile", + [""] = "VSplitOpen", + [""] = "SplitOpen", + [""] = "TabOpen", + ["{"] = "GoToPreviousHunkHeader", + ["}"] = "GoToNextHunkHeader", + }, + }, }) local dap, dapui = require("dap"), require("dapui") dap.adapters.lldb = {