- Finally move all keymappings into which-key - Change to MunsMan/kitty-navigator.nvim - Change mapping for switching window/split to Ctrl+Shift+<vim-motion> - Add some new mappings like 'gt' for LazyGit Terminal split
45 lines
1.3 KiB
Lua
45 lines
1.3 KiB
Lua
-- -----------------------------------------------------------------------------
|
|
-- ------------------------------- ToggleTerm ----------------------------------
|
|
-- -----------------------------------------------------------------------------
|
|
return {
|
|
"akinsho/toggleterm.nvim",
|
|
version = false,
|
|
lazy = false,
|
|
config = function()
|
|
require("toggleterm").setup({
|
|
-- size can be a number or function which is passed the current terminal
|
|
size = function(term)
|
|
if term.direction == "horizontal" then
|
|
return 10
|
|
elseif term.direction == "vertical" then
|
|
return vim.o.columns * 0.4
|
|
end
|
|
end,
|
|
open_mapping = [[<c-\>]],
|
|
hide_numbers = true,
|
|
autochdir = true,
|
|
shade_terminals = false,
|
|
start_in_insert = true,
|
|
insert_mappings = true,
|
|
terminal_mappings = true,
|
|
persist_size = true,
|
|
persist_mode = true,
|
|
direction = "horizontal",
|
|
close_on_exit = true,
|
|
shell = vim.o.shell,
|
|
auto_scroll = true,
|
|
float_opts = {
|
|
border = "curved",
|
|
winblend = 3,
|
|
title_pos = "left",
|
|
},
|
|
winbar = {
|
|
enabled = true,
|
|
name_formatter = function(term) -- term: Terminal
|
|
return term.name
|
|
end,
|
|
},
|
|
})
|
|
end,
|
|
}
|