From c1ae78cd8c8f8ef85ca98d1c6445789f3915f973 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 7 Apr 2024 14:07:31 +0200 Subject: [PATCH] plugins/rest: add keybinds option --- plugins/utils/rest.nix | 14 ++++++++++++++ tests/test-sources/plugins/utils/rest.nix | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/plugins/utils/rest.nix b/plugins/utils/rest.nix index bd59cfb7..bc7d61e5 100644 --- a/plugins/utils/rest.nix +++ b/plugins/utils/rest.nix @@ -260,6 +260,20 @@ with lib; "HTML formatter."; }; }; + + keybinds = { + buffer_local = helpers.defaultNullOpts.mkBool false '' + Enable keybinds only in request result buffer. + ''; + + prev = helpers.defaultNullOpts.mkStr "H" '' + Mapping for cycle to previous result pane. + ''; + + next = helpers.defaultNullOpts.mkStr "L" '' + Mapping for cycle to next result pane. + ''; + }; }; highlight = { diff --git a/tests/test-sources/plugins/utils/rest.nix b/tests/test-sources/plugins/utils/rest.nix index 8cf0460c..38fa8f36 100644 --- a/tests/test-sources/plugins/utils/rest.nix +++ b/tests/test-sources/plugins/utils/rest.nix @@ -69,6 +69,11 @@ ''; }; }; + keybinds = { + buffer_local = false; + prev = "H"; + next = "L"; + }; }; highlight = { enable = true;