mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-01 11:01:15 +00:00
toggleterm: make lazygit keybind optional
This commit is contained in:
parent
9360becd30
commit
7543cc2725
1 changed files with 5 additions and 5 deletions
|
@ -5,6 +5,7 @@
|
|||
}: let
|
||||
inherit (builtins) toJSON;
|
||||
inherit (lib.strings) optionalString;
|
||||
inherit (lib.lists) optional;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.nvim.binds) mkLznBinding;
|
||||
|
@ -17,13 +18,12 @@ in {
|
|||
lazy.plugins.toggleterm-nvim = {
|
||||
package = "toggleterm-nvim";
|
||||
cmd = ["ToggleTerm" "ToggleTermSendCurrentLine" "ToggleTermSendVisualLines" "ToggleTermSendVisualSelection" "ToggleTermSetName" "ToggleTermToggleAll"];
|
||||
keys = [
|
||||
(mkLznBinding ["n"] cfg.mappings.open "<Cmd>execute v:count . \"ToggleTerm\"<CR>" "Toggle terminal")
|
||||
{
|
||||
keys =
|
||||
[(mkLznBinding ["n"] cfg.mappings.open "<Cmd>execute v:count . \"ToggleTerm\"<CR>" "Toggle terminal")]
|
||||
++ optional cfg.lazygit.enable {
|
||||
key = cfg.lazygit.mappings.open;
|
||||
desc = lazygitMapDesc;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
setupModule = "toggleterm";
|
||||
inherit (cfg) setupOpts;
|
||||
|
|
Loading…
Reference in a new issue