feat(config): add scratch terminal toggle functionality

This commit is contained in:
Prad Nukala committed 2025-10-27 20:26:41 -04:00
1 parent dfd0382852
commit 0116171278
1 file changed
+11
+11
View File
@@ -66,11 +66,22 @@ function M.setup()
end, end,
} }
-- Scratch terminal
local scratch = Terminal:new {
cmd = "zsh",
hidden = true,
direction = "horizontal",
on_open = function(term)
vim.cmd "startinsert!"
vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", { noremap = true, silent = true })
end,
}
-- Export toggle functions to module instead of global namespace -- Export toggle functions to module instead of global namespace
M.scooter_toggle = function() scooter:toggle() end M.scooter_toggle = function() scooter:toggle() end
M.mk_toggle = function() mk:toggle() end M.mk_toggle = function() mk:toggle() end
M.lazygit_toggle = function() lazygit:toggle() end M.lazygit_toggle = function() lazygit:toggle() end
M.smartCommit_toggle = function() smartCommit:toggle() end M.smartCommit_toggle = function() smartCommit:toggle() end
M.scratch_toggle = function() scratch:toggle() end
end end
return M return M