Skip to content

Commit 74c5001

Browse files
committed
Latest config changes
Better git commands to handle main / master branch Add copilot Few upgrades and fixes
1 parent 7b28766 commit 74c5001

File tree

8 files changed

+224
-116
lines changed

8 files changed

+224
-116
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
vim/bundle
22
vim/spell
3+
vim/backup
34
tmux/plugins
45
!tmux/plugins/tpm

bashrc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@ export GPG_TTY=$(tty)
77

88
[ -e ~/.rvm/scripts/rvm ] && . ~/.rvm/scripts/rvm
99
[ -e ~/.phpbrew/bashrc ] && . ~/.phpbrew/bashrc
10+
[ -e /opt/homebrew/bin/brew ] && eval "$(/opt/homebrew/bin/brew shellenv)"
1011

1112
export GOPATH=$HOME/go
12-
PATH="$PATH:$GOPATH/bin"
13+
PATH="$GOPATH/bin:$PATH"
1314
PATH="/usr/local/bin:$PATH"
14-
PATH="$PATH:/usr/local/sbin"
15-
PATH="$PATH:$HOME/.rvm/bin"
15+
PATH="/usr/local/sbin:$PATH"
16+
PATH="$HOME/.rvm/bin:$PATH"
17+
PATH="/opt/homebrew/opt/libpq/bin:$PATH"
18+
PATH="/opt/homebrew/opt/openjdk/bin:$PATH"
19+
export JAVA_HOME=/opt/homebrew/Cellar/openjdk/23.0.2/libexec/openjdk.jdk/Contents/Home
1620

1721
# If not running interactively, don't do anything
1822
[ -z "$PS1" ] && return
@@ -22,6 +26,7 @@ export COMP_KNOWN_HOSTS_WITH_HOSTFILE=''
2226

2327
TERM='xterm-256color'
2428
export EDITOR='nvim'
29+
alias vim="nvim"
2530
profile=`echo $ITERM_PROFILE | tr '[:upper:]' '[:lower:]'`
2631
if [[ "$profile" == *"light"* ]]; then
2732
export COLORSCHEME='light'

config/nvim/init.vim

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,28 @@ source ~/.vimrc
44

55
let test#strategy = "neovim"
66
tnoremap <C-W>N <C-\><C-n>
7+
8+
9+
lua << EOF
10+
require('codecompanion')
11+
EOF
12+
13+
" lua << EOF
14+
" require('codecompanion').setup({
15+
" ollama = {
16+
" model = "gemma3:1b",
17+
" host = "http://localhost:11434"
18+
" },
19+
" strategies = {
20+
" chat = {
21+
" adapter = "ollama",
22+
" },
23+
" inline = {
24+
" adapter = "ollama",
25+
" },
26+
" agent = {
27+
" adapter = "ollama",
28+
" },
29+
" },
30+
" })
31+
" EOF

config/starship.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,3 +165,6 @@ format = '[$symbol($version)]($style) '
165165

166166
[zig]
167167
format = '[$symbol($version)]($style) '
168+
169+
[battery]
170+
disabled = true

gitconfig

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
[core]
2-
editor = vim
2+
editor = nvim
3+
excludesfile = /Users/bliof/local/dotfiles/git-global-ignore
34
[user]
45
name = Aleksandar Ivanov
56
6-
signingkey = D626A7AB76CBE9D5
7+
signingkey = 1404AF30CC6873B8
78
[color]
89
ui = auto
910
[color "diff"]
@@ -45,14 +46,19 @@
4546
ra = !git r --all
4647
l = "!. ~/.githelpers && pretty_git_log"
4748
la = !git l --all
48-
d = log --graph --decorate --stat master..
49+
default-branch = ![ -f "$(git rev-parse --show-toplevel 2>/dev/null)/.git/refs/heads/main" ] && echo main || echo master
4950
review = !git stash && git fetch origin $1 && (git branch -m $1 tmp-review-$1-$(date +%Y-%m-%d-%H-%M-%S) || :) && git checkout -b $1 origin/$1 && :
5051
nuke-review-tmp = !git branch | grep 'tmp-review' | xargs git branch -D
51-
changes = !BRANCH="${1:-$(git branch-name)}" && git diff --name-only $(git merge-base master "$BRANCH") "$BRANCH"
52+
changes = !BRANCH="${1:-$(git branch-name)}" && git diff --name-only $(git merge-base $(git default-branch) "$BRANCH") "$BRANCH"
5253
branch-name = !git rev-parse --abbrev-ref HEAD
53-
mm = !BRANCH="${1:-$(git branch-name)}" && git checkout master && git pull origin master && git checkout "$BRANCH" && git rebase master
54+
mm = !BRANCH="${1:-$(git branch-name)}" && git checkout $(git default-branch) && git pull origin $(git default-branch) && git checkout "$BRANCH" && git rebase $(git default-branch)
55+
ba = for-each-ref --sort=committerdate refs/heads/ --format='%(color: red)%(committerdate:short) %(color: cyan)%(refname:short)'
5456
b = for-each-ref --sort=committerdate refs/heads/ --format='%(committerdate:short) %(refname:short)'
57+
fame = !python -m gitfame
58+
count-lines = "! git log --author=\"$1\" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf \"added lines: %s, removed lines: %s, total lines: %s\\n\", add, subs, loc }' #"
5559
[gpg]
5660
program = gpg
5761
[url "ssh://[email protected]/"]
5862
insteadOf = https://github.com/
63+
[commit]
64+
gpgsign = true

0 commit comments

Comments
 (0)