Signed-off-by: Christoph Schmatzler <christoph@schmatzler.com>
This commit is contained in:
2025-11-04 16:11:12 +00:00
parent 7fa8206850
commit c224420060
4 changed files with 41 additions and 14 deletions

View File

@@ -9,10 +9,11 @@
./plugins/diffview.nix ./plugins/diffview.nix
./plugins/grug-far.nix ./plugins/grug-far.nix
./plugins/harpoon.nix ./plugins/harpoon.nix
./plugins/lsp.nix ./plugins/lsp.nix
./plugins/mini.nix ./plugins/mini.nix
./plugins/neogit.nix
./plugins/oil.nix ./plugins/oil.nix
./plugins/toggleterm.nix
./plugins/treesitter.nix ./plugins/treesitter.nix
]; ];

View File

@@ -128,10 +128,27 @@
key = "<leader>gg"; key = "<leader>gg";
action.__raw = '' action.__raw = ''
function() function()
require('neogit').open({}) local Terminal = require('toggleterm.terminal').Terminal
local lazygit = Terminal:new({
cmd = "lazygit",
dir = "git_dir",
direction = "float",
float_opts = {
border = "curved",
winblend = 3,
},
on_open = function(term)
vim.cmd("startinsert!")
vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", {noremap = true, silent = true})
end,
on_close = function(term)
vim.cmd("startinsert!")
end,
})
lazygit:toggle()
end end
''; '';
options.desc = "Neogit"; options.desc = "Lazygit (toggleterm)";
} }
# l - lsp/formatter # l - lsp/formatter
{ {

View File

@@ -1,11 +0,0 @@
{
programs.nixvim.plugins.neogit = {
enable = true;
settings = {
disable_signs = false;
integrations = {
diffview = true;
};
};
};
}

View File

@@ -0,0 +1,20 @@
{
programs.nixvim.plugins.toggleterm = {
enable = true;
settings = {
open_mapping = null;
direction = "float";
float_opts = {
border = "curved";
winblend = 3;
};
size = 20;
hide_numbers = true;
shade_terminals = true;
shading_factor = 2;
start_in_insert = true;
close_on_exit = true;
shell = "fish";
};
};
}