Revert "kak: Usar kakoune.cr en vez de fzf.kak"

This reverts commit c4c5b5fc9a.
This commit is contained in:
Cat /dev/Nulo 2022-08-02 11:12:47 +02:00
parent 82f84e88ea
commit 57bed2a06d
2 changed files with 21 additions and 37 deletions

View file

@ -57,26 +57,11 @@ hook global WinSetOption filetype=go %{
# Usar Foot # Usar Foot
# ------------ # ------------
eval %sh{ hook global KakBegin .* %{ set-option global termcmd "footclient sh -c" }
# https://github.com/alexherbo2/kakoune.cr/issues/33#issuecomment-1112160325 define-command fzf-terminal -params 1.. -shell-completion %{
if test -n "$TMUX"; then echo " set-option global termcmd "footclient --app-id=fzf sh -c"
define-command tmux-terminal-popup -params 1.. -shell-completion -docstring ' wayland-terminal %arg{@}
tmux-terminal-popup <program> [<arguments>]: create a new terminal as a tmux popup set-option global termcmd "footclient sh -c"
The program passed as argument will be executed in the new popup' \
%{
tmux-terminal-impl 'display-popup -E -h 75% -w 75% -d #{pane_current_path}' %arg{@}
}
alias global terminal-popup tmux-terminal-popup
"
elif test -n "$WAYLAND_DISPLAY"; then echo '
hook global KakBegin .* %{ set-option global termcmd "footclient sh -c" }
define-command terminal-popup -params 1.. -shell-completion %{
set-option global termcmd "footclient --app-id=fzf sh -c"
wayland-terminal %arg{@}
set-option global termcmd "footclient sh -c"
}
'
fi
} }
# ------------ # ------------
@ -117,18 +102,25 @@ hook -group sleuth global BufOpenFile .* %{ sleuth }
hook -group sleuth global BufWritePost .* %{ sleuth } hook -group sleuth global BufWritePost .* %{ sleuth }
# ------------ # ------------
# Kakoune.cr # FZF
# ------------ # ------------
source "%val{config}/plugins/fzf.kak/rc/fzf.kak"
evaluate-commands %sh{ evaluate-commands %sh{
kcr init kakoune find -L "$kak_config/plugins/fzf.kak/rc/modules/" -type f -name '*.kak' -exec printf 'source "%s"\n' {} \;
} }
hook global ModuleLoaded fzf %{
map -docstring 'new client' global normal <c-t> ': new<ret>' set-option global fzf_terminal_command 'fzf-terminal kak -c %val{session} -e "%arg{@}"'
map -docstring 'terminal' global normal <c-ret> ': connect terminal<ret>' }
map -docstring 'file picker' global normal <c-f> ': connect terminal-popup kcr fzf files -- -H<ret>' hook global ModuleLoaded fzf-file %{
map -docstring 'buffer picker' global normal <c-b> ': connect terminal-popup kcr fzf buffers<ret>' set-option global fzf_file_command 'rg -L --hidden --files --glob !.git'
map -docstring 'grep picker' global normal <c-g> ': connect terminal-popup kcr fzf grep<ret>' }
hook global ModuleLoaded fzf-grep %{
set-option global fzf_grep_command 'rg'
}
map -docstring 'search files' global user f ': fzf-mode<ret>f'
map -docstring 'search buffers' global user b ': fzf-mode<ret>b'
map -docstring 'grep files' global user g ': fzf-mode<ret>g'
# ------------ # ------------
# Buffer switching # Buffer switching

View file

@ -28,13 +28,5 @@ Probablemente incompleto.
### Alpine ### Alpine
```sh ```sh
apk add zsh zsh-vcs fzf kak apk add zsh zsh-vcs fzf vis
```
#### Para editor mejorado
(requiere tmux o Wayland+foot)
```sh
apk add kakoune-cr kakoune-cr-commands bat fd
``` ```