Skip to content

Commit

Permalink
Merge branch 'hjdivad/tweaks'
Browse files Browse the repository at this point in the history
  • Loading branch information
hjdivad committed Apr 3, 2024
2 parents e79670d + 5c52356 commit 2903cf3
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 8 deletions.
4 changes: 0 additions & 4 deletions packages/bash/shell.bash
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,6 @@ function __setup_env {
export EDITOR='nvim'
export GIT_EDITOR='nvim'
fi

if which difft> /dev/null 2>&1; then
export GIT_EXTERNAL_DIFF=difft
fi
}

function __setup_aliases {
Expand Down
26 changes: 25 additions & 1 deletion packages/git/config.git
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@

yuno = check-ignore -nv

head = show -w --color-words HEAD
head = show
; these options don't make sense when using delta
; head = show -w --color-words HEAD
head-msg = log --pretty="%s%n%n%b" -n 1
# show list of all committers, with commit counts + email
count = shortlog -sne
Expand Down Expand Up @@ -101,6 +103,7 @@

[core]
editor = /usr/bin/vim
pager = delta

[color]
grep = true
Expand Down Expand Up @@ -159,6 +162,27 @@
[init]
defaultBranch = master

[interactive]
diffFilter = delta --color-only

[delta]
side-by-side = true
line-numbers = true
features = "tokyonight"
true-color = always
# https://github.com/folke/tokyonight.nvim/blob/v3.0.1/extras/delta/tokyonight_night.gitconfig
minus-style = syntax "#37222c"
minus-non-emph-style = syntax "#37222c"
minus-emph-style = syntax "#713137"
minus-empty-line-marker-style = syntax "#37222c"
line-numbers-minus-style = "#b2555b"
plus-style = syntax "#20303b"
plus-non-emph-style = syntax "#20303b"
plus-emph-style = syntax "#2c5a66"
plus-empty-line-marker-style = syntax "#20303b"
line-numbers-plus-style = "#266d6a"
line-numbers-zero-style = "#3b4261"

[blame]
# Use GitHub's default file for ignoring blame revs
# see https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view
Expand Down
7 changes: 4 additions & 3 deletions packages/nvim/config/lua/plugins/editor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ return {
{ "<leader>xX", false },
{ "<leader>xL", false },
{ "<leader>xQ", false },
{ "<leader>cq", "<cmd>TroubleClose<cr>", desc = "Close Diagnostics (Trouble)" },
{ "<leader>cd", "<cmd>Trouble document_diagnostics<cr>", desc = "Document Diagnostics (Trouble)" },
{ "<leader>cD", "<cmd>Trouble workspace_diagnostics<cr>", desc = "Workspace Diagnostics (Trouble)" },
{ "<leader>cq", "<cmd>Trouble diagnostics close<cr>", desc = "Close Diagnostics (Trouble)" },
{ "<leader>cd", "<cmd>Trouble diagnostics filter.buf=0 focus=true<cr>", desc = "Document Diagnostics (Trouble)" },
-- TODO: can we filter these by path?
{ "<leader>cD", "<cmd>Trouble diagnostics focus=true<cr>", desc = "Workspace Diagnostics (Trouble)" },
},
},
{
Expand Down

0 comments on commit 2903cf3

Please sign in to comment.