diff --git a/config/nvim/lua/nifoc/config/fterm.lua b/config/nvim/lua/nifoc/config/fterm.lua index 0c1e0f4..8c3a904 100644 --- a/config/nvim/lua/nifoc/config/fterm.lua +++ b/config/nvim/lua/nifoc/config/fterm.lua @@ -1,3 +1,20 @@ -require('FTerm').setup { - border = { '╭', '─', '╮', '│', '╯', '─', '╰', '│' } +local fterm = require('FTerm') + +fterm.setup { + cmd = 'fish', + + border = { '╭', '─', '╮', '│', '╯', '─', '╰', '│' }, } + +local lazygit = fterm:new({ + cmd = 'lazygit', + + dimensions = { + height = 0.9, + width = 0.9 + }, +}) + +function _G.__fterm_lazygit() + lazygit:toggle() +end diff --git a/config/nvim/lua/nifoc/keymap.lua b/config/nvim/lua/nifoc/keymap.lua index 8df08cf..5cb4976 100644 --- a/config/nvim/lua/nifoc/keymap.lua +++ b/config/nvim/lua/nifoc/keymap.lua @@ -86,6 +86,10 @@ function M.setup() function() require('gitsigns').blame_line() end, "Blame Line" }, + c = { + function() _G.__fterm_lazygit() end, + "lazygit" + }, }, d = { name = "debug", diff --git a/home.nix b/home.nix index 8139764..062e135 100644 --- a/home.nix +++ b/home.nix @@ -9,6 +9,7 @@ ./programs/nvim ./programs/git.nix + ./programs/lazygit.nix ./programs/bat.nix diff --git a/programs/lazygit.nix b/programs/lazygit.nix new file mode 100644 index 0000000..c37d1f6 --- /dev/null +++ b/programs/lazygit.nix @@ -0,0 +1,14 @@ +{ + programs.lazygit = { + enable = true; + + settings = { + git = { + paging = { + colorArg = "always"; + useConfig = true; + }; + }; + }; + }; +}