Compare commits

...

4 commits

4 changed files with 50 additions and 63 deletions

View file

@ -45,6 +45,7 @@ ln -sf $(pwd)/dotfiles/neovim/luasnippets/satysfi/math.lua ~/.config/nvim/luasni
mkdir -p ~/.julia/config
ln -sf $(pwd)/dotfiles/startup_linux.jl ~/.julia/config/startup.jl
curl -o ~/.julia/config/catppuccin.jl https://raw.githubusercontent.com/catppuccin/ohmyrepl/refs/heads/main/catppuccin.jl
mkdir -p ~/.config/lf
ln -sf $(pwd)/dotfiles/lf/lfrc ~/.config/lf/lfrc

View file

@ -1,23 +1,47 @@
cmap <tab> cmd-menu-complete
cmap <backtab> cmd-menu-complete-back
## https://github.com/gokcehan/lf/wiki/Integrations#eza
#cmd on-select &{{
# lf -remote "send $id set statfmt \"$(eza -ld --color=always "$f" | sed 's/\\/\\\\/g;s/"/\\"/g')\""
#}}
#
#cmd git_branch ${{
# git branch | fzf | xargs git checkout
# pwd_shell="$(pwd | sed 's/\\/\\\\/g;s/"/\\"/g')"
# lf -remote "send $id updir; cd \"$pwd_shell\""
#}}
#map gb :git_branch
#map gp $clear; git pull --rebase || true; echo "press ENTER"; read ENTER
#map gs $clear; git status; echo "press ENTER"; read ENTER
#map gl $clear; git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
#
#cmd on-cd &{{
# fmt="$(STARSHIP_SHELL= starship prompt | sed 's/\\/\\\\/g;s/"/\\"/g')"
# lf -remote "send $id set promptfmt \"$fmt\""
#}}
cmd fzf_search ${{
cmd="rg --column --line-number --no-heading --color=always --smart-case"
fzf --ansi --disabled --layout=reverse --header="Search in files" --delimiter=: \
--bind="start:reload([ -n {q} ] && $cmd -- {q} || true)" \
--bind="change:reload([ -n {q} ] && $cmd -- {q} || true)" \
--bind='enter:become(lf -remote "send $id select \"$(printf "%s" {1} | sed '\''s/\\/\\\\/g;s/"/\\"/g'\'')\"")' \
--preview-window='+{2}-/2' \
--preview='bat --color=always --highlight-line={2} -- {1}'
# --preview='cat -- {1}' # Use your favorite previewer here (bat, source-highlight, etc.), for example:
# --preview-window='+{2}-/2' \
# --preview='bat --color=always --highlight-line={2} -- {1}'
# Alternatively you can even use the same previewer you've configured for lf
#--preview='~/.config/lf/cleaner; ~/.config/lf/previewer {1} "$FZF_PREVIEW_COLUMNS" "$FZF_PREVIEW_LINES" "$FZF_PREVIEW_LEFT" "$FZF_PREVIEW_TOP"')"
}}
map gs :fzf_search
# https://github.com/gokcehan/lf/wiki/Integrations#eza
cmd on-select &{{
lf -remote "send $id set statfmt \"$(eza -ld --color=always "$f" | sed 's/\\/\\\\/g;s/"/\\"/g')\""
}}
cmd git_branch ${{
git branch | fzf | xargs git checkout
pwd_shell="$(pwd | sed 's/\\/\\\\/g;s/"/\\"/g')"
lf -remote "send $id updir; cd \"$pwd_shell\""
}}
map gb :git_branch
map gp $clear; git pull --rebase || true; echo "press ENTER"; read ENTER
map gs $clear; git status; echo "press ENTER"; read ENTER
map gl $clear; git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
cmd on-cd &{{
fmt="$(STARSHIP_SHELL= starship prompt | sed 's/\\/\\\\/g;s/"/\\"/g')"
lf -remote "send $id set promptfmt \"$fmt\""
}}
set sixel true
set previewer ~/.config/lf/previewer
# https://github.com/gokcehan/lf/wiki/Previews#with-sixel
# set previewer ctpv
# set cleaner ctpvclear
# &ctpv -s $id
# &ctpvquit $id

View file

@ -1,46 +1,7 @@
;; extends
((prefixed_string_literal
prefix: (identifier) @_prefix) @injection.content
(#eq? @_prefix "md")
(#set! injection.language "markdown")
(#offset! @injection.content 0 2 0 -1))
; ((prefixed_string_literal
; prefix: (identifier) @_prefix) @injection.content
; (#eq? @_prefix "sql")
; (#set! injection.language "sql")
; (#offset! @injection.content 0 4 0 -1))
;
; ((prefixed_string_literal
; prefix: (identifier) @_prefix) @injection.content
; (#eq? @_prefix "s")
; (#set! injection.language "sql")
; (#offset! @injection.content 0 3 0 -1))
;
; ((prefixed_string_literal
; prefix: (identifier) @_prefix) @injection.content
; (#eq? @_prefix "t")
; (#set! injection.language "regex")
; (#offset! @injection.content 0 2 0 -1))
;
; ((prefixed_string_literal
; prefix: (identifier) @_prefix) @injection.content
; (#eq? @_prefix "ts")
; (#set! injection.language "regex")
; (#offset! @injection.content 0 2 0 -1))
;
; ((prefixed_string_literal
; prefix: (identifier) @_prefix) @injection.content
; (#eq? @_prefix "tu")
; (#set! injection.language "regex")
; (#offset! @injection.content 0 3 0 -1))
;
; ((prefixed_string_literal
; prefix: (identifier) @_prefix) @injection.content
; (#eq? @_prefix "sql")
; ; (#offset! @injection.content 0 2 0 -1)
; ; (#offset! @injection.content 0 6 0 -3)
; (#gsub! @injection.content "^\"%\"" "%1")
; (#set! injection.language "sql")
; )
(prefixed_string_literal
prefix: (identifier) @_prefix
(content) @injection.content
(#eq? @_prefix "sql")
(#set! injection.language "sql"))

View file

@ -493,6 +493,7 @@ vim.keymap.set('n', '<leader>fd', builtin.lsp_document_symbols, { desc = "lsp do
vim.keymap.set('n', '<leader>flr', builtin.lsp_references, { desc = "lsp references for word" })
vim.keymap.set('n', '<leader>fli', builtin.lsp_incoming_calls, { desc = "lsp incoming calls" })
vim.keymap.set('n', '<leader>flo', builtin.lsp_outgoing_calls, { desc = "lsp outgoing calls" })
vim.keymap.set('n', '<leader>fll', builtin.lsp_implementations, { desc = "lsp implementations" })
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = "buffers" })
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = "grep" })
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = "help tags" })