diff --git a/bin/install.sh b/bin/install.sh index 4da1d01..90626e9 100755 --- a/bin/install.sh +++ b/bin/install.sh @@ -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 diff --git a/dotfiles/lf/lfrc b/dotfiles/lf/lfrc index 15b8558..a0ca2df 100644 --- a/dotfiles/lf/lfrc +++ b/dotfiles/lf/lfrc @@ -1,23 +1,47 @@ cmap cmd-menu-complete cmap 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 diff --git a/dotfiles/neovim/after/queries/julia/injections.scm b/dotfiles/neovim/after/queries/julia/injections.scm index 964cc3b..efc8930 100644 --- a/dotfiles/neovim/after/queries/julia/injections.scm +++ b/dotfiles/neovim/after/queries/julia/injections.scm @@ -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")) diff --git a/dotfiles/neovim/init.lua b/dotfiles/neovim/init.lua index 4d9e226..e4f7b46 100644 --- a/dotfiles/neovim/init.lua +++ b/dotfiles/neovim/init.lua @@ -493,6 +493,7 @@ vim.keymap.set('n', 'fd', builtin.lsp_document_symbols, { desc = "lsp do vim.keymap.set('n', 'flr', builtin.lsp_references, { desc = "lsp references for word" }) vim.keymap.set('n', 'fli', builtin.lsp_incoming_calls, { desc = "lsp incoming calls" }) vim.keymap.set('n', 'flo', builtin.lsp_outgoing_calls, { desc = "lsp outgoing calls" }) +vim.keymap.set('n', 'fll', builtin.lsp_implementations, { desc = "lsp implementations" }) vim.keymap.set('n', 'fb', builtin.buffers, { desc = "buffers" }) vim.keymap.set('n', 'fg', builtin.live_grep, { desc = "grep" }) vim.keymap.set('n', 'fh', builtin.help_tags, { desc = "help tags" })