Add lazygit support, make terminal floating
This commit is contained in:
parent
3fca673f35
commit
baf5437059
12
init.lua
12
init.lua
|
@ -15,5 +15,15 @@ require('lualine').setup{
|
||||||
require('toggleterm').setup{
|
require('toggleterm').setup{
|
||||||
open_mapping = [[,t]],
|
open_mapping = [[,t]],
|
||||||
size = 20,
|
size = 20,
|
||||||
hide_numbers = true -- hide the number column in toggleterm buffers
|
hide_numbers = true, -- hide the number column in toggleterm buffers
|
||||||
|
direction = 'float',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local Terminal = require('toggleterm.terminal').Terminal
|
||||||
|
local lazygit = Terminal:new({ cmd = "lazygit", hidden = true })
|
||||||
|
|
||||||
|
function _lazygit_toggle()
|
||||||
|
lazygit:toggle()
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.api.nvim_set_keymap("n", ",g", "<cmd>lua _lazygit_toggle()<CR>", {noremap = true, silent = true})
|
||||||
|
|
Loading…
Reference in a new issue