kickstart.nvim/lua/custom/plugins/toggleterm.lua

45 lines
1.0 KiB
Lua

return {
'akinsho/toggleterm.nvim',
version = '*',
config = function()
require('toggleterm').setup {
size = function(term)
if term.direction == 'horizontal' then
return 15
elseif term.direction == 'vertical' then
return vim.o.columns * 0.4
end
end,
open_mapping = [[<c-\>]],
hide_numbers = true,
shade_filetypes = {},
autochdir = false,
shade_terminals = true,
start_in_insert = true,
insert_mappings = true,
terminal_mappings = true,
persist_size = true,
persist_mode = true,
direction = 'float',
close_on_exit = true,
clear_env = false,
shell = 'zsh',
auto_scroll = true,
float_opts = {
border = 'single',
winblend = 0,
title_pos = 'left',
},
winbar = {
enabled = false,
name_formatter = function(term)
return term.name
end,
},
responsiveness = {
horizontal_breakpoint = 135,
},
}
end,
}