mirror of
https://github.com/boxpositron/absolute-vim.git
synced 2026-02-28 03:30:36 +00:00
fix(toggleterm.lua): change key mapping for opening lazygit from "<leader>gl" to "<leader>gs" to avoid conflicts with other mappings
feat(toggleterm.lua): set toggleterm direction to "float" to make the terminal window float instead of splitting the current window
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
local toggle_term = require("toggleterm")
|
||||
local Terminal = require("toggleterm.terminal").Terminal
|
||||
|
||||
toggle_term.setup()
|
||||
toggle_term.setup({
|
||||
direction = "float",
|
||||
})
|
||||
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
@@ -28,7 +30,7 @@ function _LAZYGIT_TOGGLE()
|
||||
end
|
||||
|
||||
opts.desc = "Open lazygit"
|
||||
vim.api.nvim_set_keymap("n", "<leader>gl", "<cmd>lua _LAZYGIT_TOGGLE()<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "<leader>gs", "<cmd>lua _LAZYGIT_TOGGLE()<CR>", opts)
|
||||
|
||||
opts.desc = "Open a terminal"
|
||||
vim.api.nvim_set_keymap("n", "<C-`>", "<cmd>ToggleTerm<CR>", opts)
|
||||
|
||||
Reference in New Issue
Block a user