From 99b2c9ee9244f3b18224bbb3bbe2d00643814f72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Fri, 22 Sep 2023 12:54:05 +0200 Subject: [PATCH] Fzf for fish changed, lazygit new bind for commitizen and change .gitconfig to use nvimmerge --- .config/fish/functions/_fzf_search_directory.fish | 12 ++++++++++-- .config/lazygit/config.yml | 15 +++++++++++---- .gitconfig | 2 +- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/.config/fish/functions/_fzf_search_directory.fish b/.config/fish/functions/_fzf_search_directory.fish index 37da42b1..16e73036 100644 --- a/.config/fish/functions/_fzf_search_directory.fish +++ b/.config/fish/functions/_fzf_search_directory.fish @@ -31,9 +31,17 @@ function _fzf_search_directory --description "Search the current directory. Repl set -f file_paths_selected ($fd_cmd 2>/dev/null | _fzf_wrapper $fzf_arguments) end - + # if test $status -eq 0 + # commandline --current-token --replace -- (string escape -- $file_paths_selected | string join ' ') + # end if test $status -eq 0 - commandline --current-token --replace -- (string escape -- $file_paths_selected | string join ' ') + if test -d $file_paths_selected + cd $file_paths_selected + + _fzf_search_directory + else + $EDITOR $file_paths_selected + end end commandline --function repaint diff --git a/.config/lazygit/config.yml b/.config/lazygit/config.yml index 387ca4b5..d6a8e85a 100644 --- a/.config/lazygit/config.yml +++ b/.config/lazygit/config.yml @@ -81,10 +81,10 @@ git: parseEmoji: false diffContextSize: 3 # how many lines of context are shown around a change in diffs os: - editPreset: "neovim" # see 'Configuring File Editing' section - edit: "neovim {{filename}}" - editAtLine: "neovim --line={{line}} {{filename}}" - editAtLineAndWait: "neovim --block --line={{line}} {{filename}}" + editPreset: "nvim-remote" # see 'Configuring File Editing' section + edit: "nvim {{filename}}" + editAtLine: "nvim --line={{line}} {{filename}}" + editAtLineAndWait: "nvim --block --line={{line}} {{filename}}" refresher: refreshInterval: 10 # File/submodule refresh interval in seconds. Auto-refresh can be disabled via option 'git.autoRefresh'. fetchInterval: 60 # Re-fetch interval in seconds. Auto-fetch can be disabled via option 'git.autoFetch'. @@ -226,3 +226,10 @@ keybinding: init: "i" update: "u" bulkMenu: "b" +customCommands: + - key: "C" + command: "git cz c" + description: "commit with commitizen" + context: "files" + loadingText: "opening commitizen commit tool" + subprocess: true diff --git a/.gitconfig b/.gitconfig index 2612be6f..6c5abfa9 100644 --- a/.gitconfig +++ b/.gitconfig @@ -23,7 +23,7 @@ [interactive] diffFilter = diff-so-fancy --patch [merge] - tool = nvim + tool = nvimdiff conflictstyle = diff3 [pager] blame = diff-so-fancy | less --tabs=4 -RFX