@@ -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
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
programs.nixvim.plugins.neogit = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
disable_signs = false;
|
|
||||||
integrations = {
|
|
||||||
diffview = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
20
modules/home/neovim/plugins/toggleterm.nix
Normal file
20
modules/home/neovim/plugins/toggleterm.nix
Normal 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user