-- ----------------------------------------------------------------------------- -- ------------------------------- 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 = [[]], 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, }, }) -- Keybinds vim.api.nvim_set_keymap( "n", "", ":ToggleTerm", { noremap = true, desc = " Open Terminal" } ) end, }