local lazygit = function() local fterm = require('FTerm') fterm.scratch({ -- ft = 'fterm_lazygit', -- You can also override the default filetype, if you want cmd = 'lazygit', auto_close = true, dimensions = { height = 0.9, width = 0.9 } }) end local git_history = function() local fterm = require('FTerm') local file = vim.api.nvim_buf_get_name(0) local cmd = 'git log -p --ext-diff ' .. file fterm.scratch({ -- ft = 'git_history', -- You can also override the default filetype, if you want cmd = cmd, auto_close = true, dimensions = { height = 0.9, width = 0.9 } }) end return { 'numToStr/FTerm.nvim', keys = { { 'g', lazygit, { desc = 'Toggle lazygit' } }, { 'H', git_history, { desc = 'Show git history' } } }, lazy = true, }