diff options
| author | kylo252 <[email protected]> | 2022-07-31 14:28:43 +0200 | 
|---|---|---|
| committer | kylo252 <[email protected]> | 2022-07-31 14:28:43 +0200 | 
| commit | 6fbefdacd35f03b8146490613c54e7865d06a77f (patch) | |
| tree | 70e378c86c411b4c959e7f04851263fc96ad752e /lua/lvim/core/terminal.lua | |
| parent | b04aefbb79670b115f4f363906d6d294b3d0a2a3 (diff) | |
| parent | dec21bbab6cf9102e236806e20273d08f32f8716 (diff) | |
Merge branch 'rolling'
Diffstat (limited to 'lua/lvim/core/terminal.lua')
| -rw-r--r-- | lua/lvim/core/terminal.lua | 21 | 
1 files changed, 3 insertions, 18 deletions
| diff --git a/lua/lvim/core/terminal.lua b/lua/lvim/core/terminal.lua index 6c190dd5..6f543d06 100644 --- a/lua/lvim/core/terminal.lua +++ b/lua/lvim/core/terminal.lua @@ -41,7 +41,6 @@ M.config = function()      -- lvim.builtin.terminal.execs[#lvim.builtin.terminal.execs+1] = {"gdb", "tg", "GNU Debugger"}      execs = {        { "lazygit", "<leader>gg", "LazyGit", "float" }, -      { "lazygit", "<c-\\><c-g>", "LazyGit", "float" },      },    }  end @@ -76,23 +75,9 @@ M.add_exec = function(opts)      return    end -  local exec_func = string.format( -    "<cmd>lua require('lvim.core.terminal')._exec_toggle({ cmd = '%s', count = %d, direction = '%s'})<CR>", -    opts.cmd, -    opts.count, -    opts.direction -  ) - -  require("lvim.keymappings").load { -    normal_mode = { [opts.keymap] = exec_func }, -    term_mode = { [opts.keymap] = exec_func }, -  } - -  local wk_status_ok, wk = pcall(require, "which-key") -  if not wk_status_ok then -    return -  end -  wk.register({ [opts.keymap] = { opts.label } }, { mode = "n" }) +  vim.keymap.set({ "n", "t" }, opts.keymap, function() +    M._exec_toggle { cmd = opts.cmd, count = opts.count, direction = opts.direction } +  end, { desc = opts.label, noremap = true, silent = true })  end  M._exec_toggle = function(opts) | 
