This commit is contained in:
2025-10-12 19:50:29 +00:00
parent c367bf234f
commit 60242632d0
7 changed files with 113 additions and 7 deletions

View File

@@ -12,8 +12,7 @@
./fish.nix ./fish.nix
./fzf.nix ./fzf.nix
./git.nix ./git.nix
./lazygit.nix
./mise.nix ./mise.nix
./neovim ./neovim
./opencode.nix ./opencode.nix

View File

@@ -27,6 +27,11 @@ in {
side-by-side = true; side-by-side = true;
pager = "less -FRX"; pager = "less -FRX";
}; };
pager = {
diff = "delta";
log = "delta";
show = "delta";
};
}; };
}; };

54
modules/home/lazygit.nix Normal file
View File

@@ -0,0 +1,54 @@
{
programs.lazygit = {
enable = true;
settings = {
git = {
commit.signOff = true;
paging = {
colorArg = "always";
pager = "DELTA_FEATURES=decorations delta --light --paging=never --line-numbers --hyperlinks --hyperlinks-file-link-format=\"lazygit-edit://{path}:{line}\"";
};
};
gui = {
authorColors = {
"*" = "#7287fd";
};
theme = {
activeBorderColor = [
"#8839ef"
"bold"
];
inactiveBorderColor = [
"#6c6f85"
];
optionsTextColor = [
"#1e66f5"
];
selectedLineBgColor = [
"#ccd0da"
];
cherryPickedCommitBgColor = [
"#bcc0cc"
];
cherryPickedCommitFgColor = [
"#8839ef"
];
defaultFgColor = [
"#4c4f69"
];
searchingActiveBorderColor = [
"#df8e1d"
];
unstagedChangesColor = [
"#d20f39"
];
};
};
};
};
home.shellAliases = {
lg = "lazygit";
};
}

View File

@@ -8,6 +8,7 @@
./plugins/conform.nix ./plugins/conform.nix
./plugins/grug-far.nix ./plugins/grug-far.nix
./plugins/lsp.nix ./plugins/lsp.nix
./plugins/neogit.nix
./plugins/mini.nix ./plugins/mini.nix
./plugins/supermaven.nix ./plugins/supermaven.nix
./plugins/oil.nix ./plugins/oil.nix

View File

@@ -94,6 +94,16 @@
options.desc = "Symbols (LSP, buffer)"; options.desc = "Symbols (LSP, buffer)";
} }
# g - git # g - git
{
mode = "n";
key = "<leader>gg";
action.__raw = ''
function()
require('neogit').open({})
end
'';
options.desc = "Neogit";
}
# l - lsp/formatter # l - lsp/formatter
{ {

View File

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

View File

@@ -5,7 +5,7 @@
settings = { settings = {
add_newline = true; add_newline = true;
command_timeout = 200; command_timeout = 200;
format = "[$directory$git_commit$git_branch$git_status]($style)$character"; format = "$directory$git_commit$git_branch$git_status$git_state$git_metrics$character";
character = { character = {
error_symbol = "[ ](bold #e64553)"; error_symbol = "[ ](bold #e64553)";
success_symbol = "[](bold #40a02b)[](bold #df8e1d)[](bold #dc8a78)"; success_symbol = "[](bold #40a02b)[](bold #df8e1d)[](bold #dc8a78)";
@@ -20,14 +20,38 @@
commit_hash_length = 4; commit_hash_length = 4;
only_detached = false; only_detached = false;
tag_disabled = true; tag_disabled = true;
format = "[$hash]($style) "; format = " [$hash]($style)";
style = "bold #89b4fa";
}; };
git_branch = { git_branch = {
format = "[$branch]($style) "; format = " [$symbol$branch(:$remote_branch)]($style)";
symbol = ""; symbol = " ";
style = "bold #a6e3a1";
truncation_length = 28;
}; };
git_status = { git_status = {
format = "| [$all_status$ahead_behind]($style) "; format = " [$ahead_behind$staged$modified$renamed$deleted$typechanged$untracked$stashed$conflicted]($style)";
style = "bold #f9e2af";
conflicted = "$count";
ahead = "$count";
behind = "$count";
diverged = "$ahead_count/$behind_count";
staged = "+$count";
modified = "~$count";
renamed = "»$count";
deleted = "×$count";
untracked = "?$count";
stashed = "$count";
typechanged = "$count";
};
git_state = {
format = " [$state($progress_current/$progress_total)]($style)";
style = "bold #f38ba8";
};
git_metrics = {
disabled = false;
format = " [+$added/-$deleted]($style)";
style = "bold #94e2d5";
}; };
}; };
}; };