From 8a57725f15376b459b756a261d703f7f534a495c Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 7 Feb 2025 16:41:06 +0100 Subject: [PATCH 1/3] nvim: Limit indentscope to reasonable max lines Stops looking for a scope after 2000 lines (instead of the default 10000). --- nvim/.config/nvim/lua/plugins/base.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nvim/.config/nvim/lua/plugins/base.lua b/nvim/.config/nvim/lua/plugins/base.lua index be88221..4cecdab 100644 --- a/nvim/.config/nvim/lua/plugins/base.lua +++ b/nvim/.config/nvim/lua/plugins/base.lua @@ -171,7 +171,7 @@ return { conflict = { suffix = "" }, -- disable to use git-conflict instead diagnostic = { suffix = "d", options = {} }, file = { suffix = "", options = {} }, - indent = { suffix = "" }, -- disable since we use indentscope above + indent = { suffix = "" }, -- disable since we use indentscope jump = { suffix = "j", options = {} }, location = { suffix = "l", options = {} }, oldfile = { suffix = "o", options = {} }, -- FIXME: overwritten by wrapping defaults currently @@ -201,7 +201,7 @@ return { require("mini.indentscope").setup({ symbol = "│", draw = { animation = require("mini.indentscope").gen_animation.none() }, - options = { indent_at_cursor = false }, + options = { indent_at_cursor = false, n_lines = 2000 }, }) -- disable indentlines for terminals vim.api.nvim_create_autocmd("TermOpen", { From 8b6e338fc212a77d604e03c58262f24c6917a114 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 7 Feb 2025 16:41:59 +0100 Subject: [PATCH 2/3] git: Reformat config --- vcs/git/config/git/config | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/vcs/git/config/git/config b/vcs/git/config/git/config index 1bfc097..bec5b39 100644 --- a/vcs/git/config/git/config +++ b/vcs/git/config/git/config @@ -20,23 +20,23 @@ smtpserver = "/usr/bin/msmtp" annotate = yes [alias] - ignore = "!gitignore -f" + ignore = "!gitignore -f" # requires gitignore script to be in PATH last = "diff HEAD~ HEAD" - pushall = "!git remote | xargs -I R git push R" # push to all connected remotes - fetchall = "!git remote | xargs -I R git fetch R" # fetch from all connected remotes + pushall = "!git remote | xargs -I R git push R" # push to all connected remotes + fetchall = "!git remote | xargs -I R git fetch R" # fetch from all connected remotes diffword = "!git diff --word-diff=color --word-diff-regex='[0-9A-Za-z_]+'" # word-wise diff, good for prose - diffsyn = "!git difftool --tool difftastic" # add syntax-driven diff using treesitter - diffside = "!DELTA_FEATURES='+side-by-side' git diff" # add side-by-side diffing - delta = "![ $TERM_DARK = false ] && delta --light || delta" # Take care that we always display right color scheme + diffsyn = "!git difftool --tool difftastic" # add syntax-driven diff using treesitter + diffside = "!DELTA_FEATURES='+side-by-side' git diff" # add side-by-side diffing + delta = "![ $TERM_DARK = false ] && delta --light || delta" # Take care that we always display right color scheme [commit] - gpgsign = true # sign commits as me - verbose = true # Always show diff when preparing commit message + gpgsign = true # sign commits as me + verbose = true # Always show diff when preparing commit message [fetch] - prune = true # remove references to non-existent remote branches + prune = true # remove references to non-existent remote branches [pull] - rebase = true # always rebase on pulling, obviates merge commits + rebase = true # always rebase on pulling, obviates merge commits [diff] - colorMoved = zebra # also color stuff that has simply been moved, in a classy zebra-color + colorMoved = zebra # also color stuff that has simply been moved, in a classy zebra-color [difftool] prompt = false [difftool "difftastic"] From 5952e32bce2bc0c06b02bd82692a1c8189531e5c Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 7 Feb 2025 16:45:00 +0100 Subject: [PATCH 3/3] git: Add pull request fetching alias Gets a pull request for the repo by directly fetching from the pull folder of the repository. Works perfectly with github (should also work with gitlab, and gitea/forgejo). Searches for a remote called github or uses the default origin one. --- vcs/git/config/git/config | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vcs/git/config/git/config b/vcs/git/config/git/config index bec5b39..c73b86d 100644 --- a/vcs/git/config/git/config +++ b/vcs/git/config/git/config @@ -28,6 +28,11 @@ diffsyn = "!git difftool --tool difftastic" # add syntax-driven diff using treesitter diffside = "!DELTA_FEATURES='+side-by-side' git diff" # add side-by-side diffing delta = "![ $TERM_DARK = false ] && delta --light || delta" # Take care that we always display right color scheme + + # check out a github PR directly on the commandline, creates pr/4 or pr/ branch locally + pr = "!f() { git fetch -fu ${2:-$(git remote |grep ^github || echo origin)} refs/pull/$1/head:pr/$1 }; f" + # remove all pr/ local branches + pr-clean = "!git for-each-ref refs/heads/pr/* --format='%(refname)' | while read ref ; do branch=${ref#refs/heads/} ; git branch -D $branch ; done" [commit] gpgsign = true # sign commits as me verbose = true # Always show diff when preparing commit message