From 01161712783efa1a8d8075d0cccbcf0995652900 Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Mon, 27 Oct 2025 20:26:41 -0400 Subject: [PATCH] feat(config): add scratch terminal toggle functionality --- lua/config/terminals.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lua/config/terminals.lua b/lua/config/terminals.lua index 5244e83..54bc52e 100644 --- a/lua/config/terminals.lua +++ b/lua/config/terminals.lua @@ -66,11 +66,22 @@ function M.setup() 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", "close", { noremap = true, silent = true }) + end, + } -- Export toggle functions to module instead of global namespace M.scooter_toggle = function() scooter:toggle() end M.mk_toggle = function() mk:toggle() end M.lazygit_toggle = function() lazygit:toggle() end M.smartCommit_toggle = function() smartCommit:toggle() end + M.scratch_toggle = function() scratch:toggle() end end return M