Add lazygit support, make terminal floating

This commit is contained in:
Edward Litherland-Smith 2022-09-13 17:44:34 +01:00
parent 3fca673f35
commit baf5437059

View file

@ -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})