make jk nav smoother in lazygit
This commit is contained in:
parent
8134cf81d5
commit
ad078209b6
|
@ -12,4 +12,22 @@ return -- nvim v0.8.0
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
},
|
},
|
||||||
|
init = function()
|
||||||
|
--Terminal opt changes (so lazygit is a bit smoother)
|
||||||
|
local function setTerminalModeVars(on)
|
||||||
|
vim.opt.timeoutlen = on and 50 or TimeoutlenBeforeTermOpen
|
||||||
|
end
|
||||||
|
vim.api.nvim_create_autocmd({ "TermOpen" }, {
|
||||||
|
callback = function()
|
||||||
|
--set a global (feels naughty but wth)
|
||||||
|
TimeoutlenBeforeTermOpen = vim.opt.timeoutlen
|
||||||
|
setTerminalModeVars(true)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
vim.api.nvim_create_autocmd({ "TermClose" }, {
|
||||||
|
callback = function()
|
||||||
|
setTerminalModeVars(false)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue