From 6290bd1624a5ba65cecbef4d690a2cb7a39d7462 Mon Sep 17 00:00:00 2001 From: Von Random Date: Fri, 17 Mar 2023 12:49:42 +0200 Subject: [PATCH] fish: fix git check; nvim: indent visibility plugin --- cli/.config/fish/functions/prompt.git.fish | 5 +++-- cli/.config/nvim/lua/plugins.lua | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cli/.config/fish/functions/prompt.git.fish b/cli/.config/fish/functions/prompt.git.fish index fed6f56..a457a89 100644 --- a/cli/.config/fish/functions/prompt.git.fish +++ b/cli/.config/fish/functions/prompt.git.fish @@ -1,7 +1,8 @@ function prompt.git - git rev-parse 2> /dev/null || return + set -l is_git_tree (git rev-parse --is-inside-work-tree 2>/dev/null) + string match -qe 'true' "$is_git_tree" || return git status --porcelain -bu | while read line - if string match -qr "^##" "$line" + if string match -qr '^##' "$line" set git_branch (string match -r '[^# .]+' "$line") string match -qr '\[behind' $line && set git_branch "$git_branch?" string match -qr '\[ahead' $line && set git_branch "$git_branch!" diff --git a/cli/.config/nvim/lua/plugins.lua b/cli/.config/nvim/lua/plugins.lua index 83bd9f3..73de7a9 100644 --- a/cli/.config/nvim/lua/plugins.lua +++ b/cli/.config/nvim/lua/plugins.lua @@ -6,6 +6,7 @@ local function plugins(use) use 'hoob3rt/lualine.nvim' use 'hashivim/vim-terraform' use 'khaveesh/vim-fish-syntax' + use 'lukas-reineke/indent-blankline.nvim' use 'mhinz/vim-signify' use 'tpope/vim-rsi' use 'tpope/vim-vinegar'