gh watch keybind for neovim toggleterm

This commit is contained in:
Noah Masur 2024-06-05 13:54:09 -04:00
parent e55ee05c5c
commit 8b1032ebda
No known key found for this signature in database

View File

@ -2,8 +2,11 @@
vim.keymap.set("n", "<Leader>gr", ":!gh browse %<CR><CR>", { silent = true }) vim.keymap.set("n", "<Leader>gr", ":!gh browse %<CR><CR>", { silent = true })
-- Pop a terminal to watch the current run -- Pop a terminal to watch the current run
local gitwatch = local gitwatch = require("toggleterm.terminal").Terminal:new({
require("toggleterm.terminal").Terminal:new({ cmd = "fish --interactive --init-command 'gh run watch'" }) cmd = "fish --interactive --init-command 'gh run watch'",
hidden = true,
direction = "float",
})
-- Set a toggle for this terminal -- Set a toggle for this terminal
function GITWATCH_TOGGLE() function GITWATCH_TOGGLE()
@ -11,4 +14,4 @@ function GITWATCH_TOGGLE()
end end
-- Keymap to toggle the run -- Keymap to toggle the run
vim.keymap.set("n", "<Leader>gw", GITWATCH_TOGGLE) vim.keymap.set("n", "<Leader>W", GITWATCH_TOGGLE)