add icecube and git config

This commit is contained in:
Jonathan Dönszelmann 2024-09-17 10:10:18 +02:00
parent e767060559
commit 8a9b1f2529
No known key found for this signature in database
8 changed files with 70 additions and 30 deletions

25
programs/git/default.nix Normal file
View file

@ -0,0 +1,25 @@
_: {
programs.git = {
enable = true;
userEmail = "jonathan@donsz.nl";
userName = "Jonathan Dönszelmann";
signing.key = "~/.ssh/id_ed25519.pub";
signing.signByDefault = true;
delta.enable = true;
delta.options = {
navigate = true;
light = false;
};
extraConfig = {
push.autoSetupRemote = true;
pull.rebase = true;
init.defaultBranch = "main";
gpg.format = "ssh";
diff.colorMoved = true;
rerere.enabled = true;
};
};
}

View file

@ -38,6 +38,11 @@ cmp.setup {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
view = {
docs = {
auto_open = false
}
},
mapping = cmp.mapping.preset.insert({
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
@ -45,6 +50,14 @@ cmp.setup {
['<C-e>'] = cmp.mapping.abort(),
-- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
['<CR>'] = cmp.mapping.confirm({ select = true }),
['<C-g>'] = function()
if cmp.visible_docs() then
cmp.close_docs()
else
cmp.open_docs()
end
end
}),
sources = cmp.config.sources({
{ name = 'nvim_lsp' },

View file

@ -20,7 +20,7 @@ let
"add" = "${pkgs.git}/bin/git add";
"patch" = "${pkgs.git}/bin/git add -p";
"amend" = "${pkgs.git}/bin/git commit --amend";
"log" = "${pkgs.git}/bin/git log --graph --oneline --format=format:'%C(auto)%h %s%d %C(green)%cr %C(bold blue)<%an>%C(auto)'";
"log" = "${pkgs.git}/bin/git log --all --graph --decorate";
};
# extracting any compressed format
extract = ''
@ -54,12 +54,12 @@ in
enableCompletion = true;
syntaxHighlighting.enable = true;
completionInit = ''
autoload -Uz compinit
if [[ -n ''${ZDOTDIR}/.zcompdump(#qN.mh+24) ]]; then
compinit;
else
compinit -C;
fi;
autoload -Uz compinit
if [[ -n ''${ZDOTDIR}/.zcompdump(#qN.mh+24) ]]; then
compinit;
else
compinit -C;
fi;
'';
initExtra = ''
source "${pkgs.grml-zsh-config}/etc/zsh/zshrc"