Lazygit integration
Parry-97 opened this issue · comments
Parampal Singh commented
Hi, I tried using the send
function for this and the command is successfully executed inside the spawned terminal but I can't insert on that specific terminal and the focus remains on the previously active buffer. have to toggle back to the terminal in order to work on it.
Is there another alternative to send
to execute the command and to work on the terminal in insert mode ?
Allan Chain commented
nvterm deliberately restores focus after sending the command to the terminal:
A workaround is to use the following:
["<leader>gg"] = {
function()
local term = require("nvterm.terminal").new("float")
vim.api.nvim_chan_send(term.job_id, "lazygit\n")
end,
"open Lazygit",
},
Parampal Singh commented
Thanks, @AllanChain .