return { 'rebelot/terminal.nvim', config = function() local terminal = require('terminal') terminal.setup({ layout = { open_cmd = 'vertical new', }, cmd = { 'bash' }, autoclose = true, }) local project_dir = require('util.finder').get_opened_folder() local term local function toggle() if term == nil then term = terminal.terminal:new() term.cwd = project_dir end term:toggle() end vim.keymap.set( { 'n', 't' }, '', toggle, { desc = 'Toggle Terminal' } ) end, }