Compare commits
4 Commits
2dd4aee7b4
...
7df2de8159
Author | SHA1 | Date |
---|---|---|
Luca Bilke | 7df2de8159 | |
Luca Bilke | ee67adaf8e | |
Luca Bilke | 6e2e0d6d89 | |
Luca Bilke | faf4613719 |
|
@ -1,2 +1,3 @@
|
||||||
|
<#git_credential_gitlab_schneiderfilz_com#>
|
||||||
<#git_credential_git_snaile_de#>
|
<#git_credential_git_snaile_de#>
|
||||||
<#git_credential_github_com#>
|
<#git_credential_github_com#>
|
||||||
|
|
|
@ -141,26 +141,33 @@ cmd fzf ${{
|
||||||
}}
|
}}
|
||||||
|
|
||||||
cmd find_word ${{
|
cmd find_word ${{
|
||||||
set +ue
|
set +ue
|
||||||
rg_cmd="rg -uu --column --line-number --no-heading --color=always --smart-case --follow"
|
|
||||||
res="$(
|
BAT="bat --style=plain --color=always --italic-text=always --pager=never --tabs=4 --theme=base16"
|
||||||
fzf --disabled --ansi --exact --layout=reverse --header 'Searching file contents' --delimiter=: \
|
|
||||||
--bind="start:reload([ -n {q} ] && $rg_cmd -- {q} || true)" \
|
rg_cmd="rg -uu --column --line-number --no-heading --color=always --smart-case --follow"
|
||||||
--bind="change:reload([ -n {q} ] && $rg_cmd -- {q} || true)" \
|
|
||||||
--preview-window="right,50%" \
|
res="$(
|
||||||
--preview='~/.config/lf/preview {1} "$FZF_PREVIEW_COLUMNS" "$FZF_PREVIEW_LINES" "$FZF_PREVIEW_LEFT" "$FZF_PREVIEW_TOP"'
|
fzf --disabled --ansi --exact --layout=reverse --header 'Searching file contents' --delimiter=: \
|
||||||
)"
|
--bind="start:reload([ -n {q} ] && $rg_cmd -- {q} || true)" \
|
||||||
file="$(realpath "$(echo "$res" | cut -d':' -f1 | sed 's/\\/\\\\/g;s/"/\\"/g')" 2>/dev/null)"
|
--bind="change:reload([ -n {q} ] && $rg_cmd -- {q} || true)" \
|
||||||
row="$(echo "$res" | cut -d':' -f2)"
|
--preview-window="right,50%,+{2}/2" \
|
||||||
column="$(echo "$res" | cut -d':' -f3)"
|
--preview="$BAT"' --highlight-line {2} {1} "$FZF_PREVIEW_COLUMNS" "$FZF_PREVIEW_LINES" "$FZF_PREVIEW_LEFT" "$FZF_PREVIEW_TOP"'
|
||||||
if [ -n "$res" ]; then
|
)"
|
||||||
if [ "$EDITOR" = "nvim" ] || [ "$EDITOR" = "vim" ]; then
|
|
||||||
lf -remote "send $id \$$EDITOR +'call cursor($row, $column)' -- '$file'"
|
file="$(realpath "$(echo "$res" | cut -d':' -f1 | sed 's/\\/\\\\/g;s/"/\\"/g')" 2>/dev/null)"
|
||||||
else
|
row="$(echo "$res" | cut -d':' -f2)"
|
||||||
lf -remote "send $id \$$EDITOR '$file'"
|
column="$(echo "$res" | cut -d':' -f3)"
|
||||||
|
|
||||||
|
if [ -n "$res" ]; then
|
||||||
|
if [ "$EDITOR" = "nvim" ] || [ "$EDITOR" = "vim" ]; then
|
||||||
|
lf -remote "send $id \$$EDITOR +'call cursor($row, $column)' -- '$file'"
|
||||||
|
else
|
||||||
|
lf -remote "send $id \$$EDITOR '$file'"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
return 0
|
return 0
|
||||||
}}
|
}}
|
||||||
|
|
||||||
cmd find_project ${{
|
cmd find_project ${{
|
||||||
|
|
|
@ -8,7 +8,7 @@ RED="\033[31m"
|
||||||
RESET="\033[0m"
|
RESET="\033[0m"
|
||||||
RS="$(printf "\037")"
|
RS="$(printf "\037")"
|
||||||
CACHE="${XDG_CACHE_HOME}/lf/$(stat --printf "%n\0%i\0%F\0%s\0%W\0%Y" -- "$(readlink -f "$1")" | sha256sum | awk '{print $1}')"
|
CACHE="${XDG_CACHE_HOME}/lf/$(stat --printf "%n\0%i\0%F\0%s\0%W\0%Y" -- "$(readlink -f "$1")" | sha256sum | awk '{print $1}')"
|
||||||
BAT="bat --style=plain --color=always --italic-text=always --pager=never --tabs=4 --theme=base16 --line-range=":$h" --terminal-width="$((w - 2))""
|
BAT="bat --style=plain --color=always --italic-text=always --pager=never --tabs=4 --theme=base16 --line-range=:$h --terminal-width=$((w - 2))"
|
||||||
CHAFA="chafa -f sixel -s ${w}x${h} --polite on --animate false"
|
CHAFA="chafa -f sixel -s ${w}x${h} --polite on --animate false"
|
||||||
|
|
||||||
run() {
|
run() {
|
||||||
|
@ -28,10 +28,10 @@ run() {
|
||||||
cached_text() {
|
cached_text() {
|
||||||
if [ -f "$CACHE" ]; then
|
if [ -f "$CACHE" ]; then
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
$BAT $BAT_ARGS "$CACHE"
|
$BAT "$CACHE"
|
||||||
else
|
else
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
run "$@" | tee -p "$CACHE" | $BAT $BAT_ARGS
|
run "$@" | tee -p "$CACHE" | $BAT
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ require("lazy").setup({
|
||||||
-- { import = "lazyvim.plugins.extras.coding.neogen" },
|
-- { import = "lazyvim.plugins.extras.coding.neogen" },
|
||||||
{ import = "lazyvim.plugins.extras.dap.core" },
|
{ import = "lazyvim.plugins.extras.dap.core" },
|
||||||
-- { import = "lazyvim.plugins.extras.editor.dial" },
|
-- { import = "lazyvim.plugins.extras.editor.dial" },
|
||||||
|
{ import = "lazyvim.plugins.extras.editor.fzf" },
|
||||||
{ import = "lazyvim.plugins.extras.editor.illuminate" },
|
{ import = "lazyvim.plugins.extras.editor.illuminate" },
|
||||||
{ import = "lazyvim.plugins.extras.editor.leap" },
|
{ import = "lazyvim.plugins.extras.editor.leap" },
|
||||||
{ import = "lazyvim.plugins.extras.editor.overseer" },
|
{ import = "lazyvim.plugins.extras.editor.overseer" },
|
||||||
|
|
|
@ -8,5 +8,7 @@ local map = vim.keymap.set
|
||||||
-- TODO: Also remove which-key entries
|
-- TODO: Also remove which-key entries
|
||||||
unmap("n", "<Leader>uL")
|
unmap("n", "<Leader>uL")
|
||||||
unmap("n", "<Leader>ul")
|
unmap("n", "<Leader>ul")
|
||||||
|
-- unmap("n", "<Leader>ft")
|
||||||
|
-- unmap("n", "<Leader>fT")
|
||||||
|
|
||||||
map("v", "p", "pgvy", { remap = true })
|
map("v", "p", "pgvy", { remap = true })
|
||||||
|
|
|
@ -19,15 +19,18 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
-- {
|
||||||
"folke/todo-comments.nvim",
|
-- "folke/todo-comments.nvim",
|
||||||
event = "VeryLazy",
|
-- event = "VeryLazy",
|
||||||
opts = {
|
-- opts = {
|
||||||
highlight = {
|
-- highlight = {
|
||||||
multiline = false,
|
-- multiline = false,
|
||||||
},
|
-- },
|
||||||
},
|
-- },
|
||||||
},
|
-- keys = {
|
||||||
|
-- { "<leader>ft", "<cmd>TodoTelescope<cr>", desc = "Find Todos" },
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
{
|
{
|
||||||
"NvChad/nvim-colorizer.lua",
|
"NvChad/nvim-colorizer.lua",
|
||||||
cmd = { "ColorizerToggle", "ColorizerAttachToBuffer", "ColorizerDetachFromBuffer", "ColorizerReloadAllBuffers" },
|
cmd = { "ColorizerToggle", "ColorizerAttachToBuffer", "ColorizerDetachFromBuffer", "ColorizerReloadAllBuffers" },
|
||||||
|
|
Loading…
Reference in New Issue