diff --git a/.config/kak/colors/grayscale-superiority.kak b/.config/kak/colors/grayscale-superiority.kak deleted file mode 100644 index 8ac7b71..0000000 --- a/.config/kak/colors/grayscale-superiority.kak +++ /dev/null @@ -1,72 +0,0 @@ -evaluate-commands %sh{ - black="rgb:000000" - dark_gray="rgb:333333" - gray="rgb:474747" - white="rgb:FFFFFF" - whiteish="rgb:DDDDDD" - - pale_blue="rgb:BBCCEE" - pale_cyan="rgb:CCEEFF" - dark_blue="rgb:222255" - dark_cyan="rgb:225555" - dark_grey="rgb:555555" - vibrant_grey="rgb:BBBBBB" - - cat <' -docstring "LSP Rename" - map buffer user a ': lsp-code-actions' -docstring "LSP Code actions" - map buffer user , ': lsp-hover' -docstring "LSP hover" - map buffer user l ': enter-user-mode lsp' -docstring "LSP mode" - lsp-enable-window - lsp-auto-signature-help-enable -} -hook global WinSetOption filetype=(svelte) %{ - map buffer user r ': lsp-rename-prompt' -docstring "LSP Rename" - map buffer user a ': lsp-code-actions' -docstring "LSP Code actions" - map buffer user , ': lsp-hover' -docstring "LSP hover" - map buffer user l ': enter-user-mode lsp' -docstring "LSP mode" - lsp-enable-window - lsp-auto-signature-help-enable -} -hook global KakEnd .* lsp-exit - -# ------------ -# Formateadores -# ------------ - -hook global WinSetOption filetype=(javascript|typescript|json|css|svelte|html) %{ - set-option buffer formatcmd %sh{ echo prettier --stdin-filepath $kak_buffile } - hook buffer BufWritePre .* format-buffer -} - -hook global WinSetOption filetype=zig %{ - set-option buffer formatcmd "zig fmt --stdin" - hook buffer BufWritePre .* format-buffer -} - -hook global WinSetOption filetype=go %{ - set-option buffer formatcmd "goimports" - hook buffer BufWritePre .* format-buffer -} - -# ------------ -# Usar Foot -# ------------ - -hook global KakBegin .* %{ set-option global termcmd "footclient sh -c" } -define-command fzf-terminal -params 1.. -shell-completion %{ - set-option global termcmd "footclient --app-id=fzf sh -c" - wayland-terminal %arg{@} - set-option global termcmd "footclient sh -c" -} - -# ------------ -# Keybindings genericas -# ------------ - -map -docstring "yank the selection into the clipboard" global user y " wl-copy" -map -docstring "paste the clipboard" global user p " wl-paste --no-newline" -map -docstring "comment" global user c ": comment-line" -map -docstring "stop searching" global user h ": set-register slash ''" - -map -docstring "write" global user w ": write" -map -docstring "quit" global user q ": quit" - -map -docstring "show whitespaces" global user s " :add-highlighter global/show-whitespaces show-whitespaces" -map -docstring "hide whitespaces" global user S " :remove-highlighter global/show-whitespaces" - -map global insert '' 'b' - -# https://github.com/Gigahawk/nixdots/blob/c98340cc56c998ac52f62d0df49c541bafcaaad7/dotfiles/kakrc -# - to select inner object -# = to select outer object -map global normal -- - -map global normal -- = - -# ------------ -# Indentación -# ------------ - -source "%val{config}/plugins/smarttab.kak/rc/smarttab.kak" -hook global ModuleLoaded smarttab %{ - set-option global softtabstop 4 -} - -# Sleuth es un "plugin" que detecta la identación del archivo y configura el editor para usarlo por defecto. -source "%val{config}/sleuth.kak" -hook -group sleuth global BufOpenFile .* %{ sleuth } -hook -group sleuth global BufWritePost .* %{ sleuth } - -# ------------ -# FZF -# ------------ - -source "%val{config}/plugins/fzf.kak/rc/fzf.kak" -evaluate-commands %sh{ - find -L "$kak_config/plugins/fzf.kak/rc/modules/" -type f -name '*.kak' -exec printf 'source "%s"\n' {} \; -} -hook global ModuleLoaded fzf %{ - set-option global fzf_terminal_command 'fzf-terminal kak -c %val{session} -e "%arg{@}"' -} -hook global ModuleLoaded fzf-file %{ - set-option global fzf_file_command 'rg -L --hidden --files --glob !.git' -} -hook global ModuleLoaded fzf-grep %{ - set-option global fzf_grep_command 'rg' -} -map -docstring 'search files' global user f ': fzf-modef' -map -docstring 'search buffers' global user b ': fzf-modeb' -map -docstring 'grep files' global user g ': fzf-modeg' - -# ------------ -# Buffer switching -# ------------ - -source "%val{config}/plugins/kakoune-buffers/buffers.kak" - -map global normal ^ q -map global normal Q - -map global normal q b -map global normal Q B -map global normal -map global normal - -map global normal b ':pick-buffers' -docstring 'pick buffers' -map global normal B ':enter-user-mode -lock buffers' -docstring 'buffers (lock)…' - -map global normal '' '' -docstring 'jump forward' - -# ------------ -# Comandos para interactuar con el mundo exterior -# ------------ - -define-command exportmd %{ - nop %sh{ - cd "$(dirname "$kak_buffile")" - exportmd pdf "$kak_buffile" - } -} -define-command pcmanfm %{ - nop %sh{ - swaymsg exec "pcmanfm --new-win '$(dirname "$kak_buffile")'" - } -} diff --git a/.config/kak/plugins/fzf.kak b/.config/kak/plugins/fzf.kak deleted file mode 160000 index 62a3de5..0000000 --- a/.config/kak/plugins/fzf.kak +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 62a3de575cceeaf9f556b824123a418def8bea7b diff --git a/.config/kak/plugins/kakoune-buffers b/.config/kak/plugins/kakoune-buffers deleted file mode 160000 index 6b2081f..0000000 --- a/.config/kak/plugins/kakoune-buffers +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6b2081f5b7d58c72de319a5cba7bf628b6802881 diff --git a/.config/kak/plugins/smarttab.kak b/.config/kak/plugins/smarttab.kak deleted file mode 160000 index 1dd3f33..0000000 --- a/.config/kak/plugins/smarttab.kak +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1dd3f33c4f65da5c13aee5d44b2e77399595830f diff --git a/.config/kak/plugins/zig.kak b/.config/kak/plugins/zig.kak deleted file mode 160000 index 54e66fc..0000000 --- a/.config/kak/plugins/zig.kak +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 54e66fcb6adf247e6ea8465ec68fe507eb27f25f diff --git a/.config/kak/sleuth.kak b/.config/kak/sleuth.kak deleted file mode 100644 index 96367ee..0000000 --- a/.config/kak/sleuth.kak +++ /dev/null @@ -1,22 +0,0 @@ -# https://github.com/mawww/kakoune/issues/2108#issuecomment-721313321 -define-command sleuth -docstring 'Heuristically set buffer options' %{ - try %{ - evaluate-commands -draft %{ - # Search the first indent level - execute-keys 'gg' '/' '^\h+' '' - - # Tab vs. Space - # https://youtu.be/V7PLxL8jIl8 - try %{ - execute-keys '' '\t' '' - noexpandtab - set-option buffer indentwidth 0 - } catch %{ - expandtab - set-option buffer indentwidth %val{selection_length} - set-option buffer softtabstop %val{selection_length} - } - } - } -} - diff --git a/.gitmodules b/.gitmodules index ede48e2..f4ef1a6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,15 +1,3 @@ -[submodule ".config/kak/plugins/smarttab.kak"] - path = .config/kak/plugins/smarttab.kak - url = https://github.com/andreyorst/smarttab.kak -[submodule ".config/kak/plugins/zig.kak"] - path = .config/kak/plugins/zig.kak - url = https://gitea.nulo.in/Nulo/zig.kak -[submodule ".config/kak/plugins/fzf.kak"] - path = .config/kak/plugins/fzf.kak - url = https://gitea.nulo.in/Nulo/fzf.kak -[submodule ".config/kak/plugins/kakoune-buffers"] - path = .config/kak/plugins/kakoune-buffers - url = https://github.com/Delapouite/kakoune-buffers [submodule ".config/vis/plugins/cursors"] path = .config/vis/plugins/cursors url = https://github.com/erf/vis-cursors