From df4d1a24a21b8ab3aa8b7dbedf060f0d69f9928c Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 21 Jun 2024 11:17:24 +0200 Subject: [PATCH] Revert "plugins/neogit: Adapt to upstream options changes" This reverts commit c490fbe5d988fc0c53539fbf887f28b964f9898d. --- plugins/git/neogit/options.nix | 42 ++++------------------- tests/test-sources/plugins/git/neogit.nix | 33 +++--------------- 2 files changed, 11 insertions(+), 64 deletions(-) diff --git a/plugins/git/neogit/options.nix b/plugins/git/neogit/options.nix index ebafa18c..401442e9 100644 --- a/plugins/git/neogit/options.nix +++ b/plugins/git/neogit/options.nix @@ -13,6 +13,10 @@ let in { filewatcher = { + interval = helpers.defaultNullOpts.mkUnsignedInt 1000 '' + Interval between two refreshes. + ''; + enabled = helpers.defaultNullOpts.mkBool true '' When enabled, will watch the `.git/` directory for changes and refresh the status buffer in response to filesystem events. @@ -308,19 +312,9 @@ in q = "Close"; "" = "Submit"; "" = "Abort"; - "" = "PrevMessage"; - "" = "NextMessage"; - "" = "ResetMessage"; } '' "Mappings for the commit editor."; - commit_editor_I = mkMappingOption '' - { - "" = "Submit"; - "" = "Abort"; - } - '' "Mappings for the commit editor (insert mode)"; - rebase_editor = mkMappingOption '' { p = "Pick"; @@ -337,18 +331,9 @@ in gj = "MoveDown"; "" = "Submit"; "" = "Abort"; - "[c" = "OpenOrScrollUp"; - "]c" = "OpenOrScrollDown"; } '' "Mappings for the rebase editor."; - rebase_editor_I = mkMappingOption '' - { - "" = "Submit"; - "" = "Abort"; - } - '' "Mappings for the rebase editor (insert mode)."; - finder = mkMappingOption '' { "" = "Select"; @@ -361,12 +346,6 @@ in "" = "MultiselectToggleNext"; "" = "MultiselectTogglePrevious"; "" = "NOP"; - "" = "ScrollWheelDown"; - "" = "ScrollWheelUp"; - "" = "NOP"; - "" = "NOP"; - "" = "MouseClick"; - "<2-LeftMouse>" = "NOP"; } '' "Mappings for the finder."; @@ -374,16 +353,12 @@ in { "?" = "HelpPopup"; A = "CherryPickPopup"; - d = "DiffPopup"; + D = "DiffPopup"; M = "RemotePopup"; P = "PushPopup"; X = "ResetPopup"; Z = "StashPopup"; - i = "IgnorePopup"; - t = "TagPopup"; b = "BranchPopup"; - B = "BisectPopup"; - w = "WorktreePopup"; c = "CommitPopup"; f = "FetchPopup"; l = "LogPopup"; @@ -408,20 +383,17 @@ in S = "StageUnstaged"; "" = "StageAll"; u = "Unstage"; - K = "Untrack"; U = "UnstageStaged"; - y = "ShowRefs"; "$" = "CommandHistory"; + "#" = "Console"; Y = "YankSelected"; "" = "RefreshBuffer"; - "" = "GoToFile"; + "" = "GoToFile"; "" = "VSplitOpen"; "" = "SplitOpen"; "" = "TabOpen"; "{" = "GoToPreviousHunkHeader"; "}" = "GoToNextHunkHeader"; - "[c" = "OpenOrScrollUp"; - "]c" = "OpenOrScrollDown"; } '' "Mappings for status."; }; diff --git a/tests/test-sources/plugins/git/neogit.nix b/tests/test-sources/plugins/git/neogit.nix index a2037a3c..805586ff 100644 --- a/tests/test-sources/plugins/git/neogit.nix +++ b/tests/test-sources/plugins/git/neogit.nix @@ -14,6 +14,7 @@ settings = { filewatcher = { + interval = 1000; enabled = true; }; graph_style = "ascii"; @@ -150,13 +151,6 @@ q = "Close"; "" = "Submit"; "" = "Abort"; - "" = "PrevMessage"; - "" = "NextMessage"; - "" = "ResetMessage"; - }; - commit_editor_I = { - "" = "Submit"; - "" = "Abort"; }; rebase_editor = { p = "Pick"; @@ -173,12 +167,6 @@ gj = "MoveDown"; "" = "Submit"; "" = "Abort"; - "[c" = "OpenOrScrollUp"; - "]c" = "OpenOrScrollDown"; - }; - rebase_editor_I = { - "" = "Submit"; - "" = "Abort"; }; finder = { "" = "Select"; @@ -191,26 +179,16 @@ "" = "MultiselectToggleNext"; "" = "MultiselectTogglePrevious"; "" = "NOP"; - "" = "ScrollWheelDown"; - "" = "ScrollWheelUp"; - "" = "NOP"; - "" = "NOP"; - "" = "MouseClick"; - "<2-LeftMouse>" = "NOP"; }; popup = { "?" = "HelpPopup"; A = "CherryPickPopup"; - d = "DiffPopup"; + D = "DiffPopup"; M = "RemotePopup"; P = "PushPopup"; X = "ResetPopup"; Z = "StashPopup"; - i = "IgnorePopup"; - t = "TagPopup"; b = "BranchPopup"; - B = "BisectPopup"; - w = "WorktreePopup"; c = "CommitPopup"; f = "FetchPopup"; l = "LogPopup"; @@ -232,20 +210,17 @@ S = "StageUnstaged"; "" = "StageAll"; u = "Unstage"; - K = "Untrack"; U = "UnstageStaged"; - y = "ShowRefs"; "$" = "CommandHistory"; + "#" = "Console"; Y = "YankSelected"; "" = "RefreshBuffer"; - "" = "GoToFile"; + "" = "GoToFile"; "" = "VSplitOpen"; "" = "SplitOpen"; "" = "TabOpen"; "{" = "GoToPreviousHunkHeader"; "}" = "GoToNextHunkHeader"; - "[c" = "OpenOrScrollUp"; - "]c" = "OpenOrScrollDown"; }; }; notification_icon = "󰊢";