diff options
| author | LostNeophyte <[email protected]> | 2022-12-05 11:46:40 +0100 | 
|---|---|---|
| committer | GitHub <[email protected]> | 2022-12-05 11:46:40 +0100 | 
| commit | 33e0960ba3fbe4988731a7e297d5f696993f8541 (patch) | |
| tree | 9f91f9d652fd85f4ca0e14521de23d0598561295 | |
| parent | 763af07570a2b0ff86330731cd9dcea23d086c64 (diff) | |
fix(terminal): use user's shell in execs (#3531)
fixes https://github.com/LunarVim/LunarVim/issues/3526
| -rw-r--r-- | lua/lvim/core/terminal.lua | 14 | 
1 files changed, 7 insertions, 7 deletions
| diff --git a/lua/lvim/core/terminal.lua b/lua/lvim/core/terminal.lua index e253c3b4..663ba77a 100644 --- a/lua/lvim/core/terminal.lua +++ b/lua/lvim/core/terminal.lua @@ -36,14 +36,14 @@ M.config = function()        },      },      -- Add executables on the config.lua -    -- { exec, keymap, name} -    -- lvim.builtin.terminal.execs = {{}} to overwrite +    -- { cmd, keymap, description, direction, size } +    -- lvim.builtin.terminal.execs = {...} to overwrite      -- lvim.builtin.terminal.execs[#lvim.builtin.terminal.execs+1] = {"gdb", "tg", "GNU Debugger"}      -- TODO: pls add mappings in which key and refactor this      execs = { -      { vim.o.shell, "<M-1>", "Horizontal Terminal", "horizontal", 0.3 }, -      { vim.o.shell, "<M-2>", "Vertical Terminal", "vertical", 0.4 }, -      { vim.o.shell, "<M-3>", "Float Terminal", "float", nil }, +      { nil, "<M-1>", "Horizontal Terminal", "horizontal", 0.3 }, +      { nil, "<M-2>", "Vertical Terminal", "vertical", 0.4 }, +      { nil, "<M-3>", "Float Terminal", "float", nil },      },    }  end @@ -63,7 +63,7 @@ end  --- Get the dynamic terminal size in cells  ---@param direction number ----@param size integer +---@param size number  ---@return integer  local function get_dynamic_terminal_size(direction, size)    size = size or lvim.builtin.terminal.size @@ -85,7 +85,7 @@ M.setup = function()      local direction = exec[4] or lvim.builtin.terminal.direction      local opts = { -      cmd = exec[1], +      cmd = exec[1] or lvim.builtin.terminal.shell,        keymap = exec[2],        label = exec[3],        -- NOTE: unable to consistently bind id/count <= 9, see #2146 | 
