diff --git a/.config/kak/colors/grayscale-superiority.kak b/.config/kak/colors/grayscale-superiority.kak new file mode 100644 index 0000000..517aed1 --- /dev/null +++ b/.config/kak/colors/grayscale-superiority.kak @@ -0,0 +1,72 @@ +evaluate-commands %sh{ + black="rgb:000000" + dark_gray="rgb:333333" + gray="rgb:666666" + 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" +# #set buffer idle_timeout 200 +# #lsp-inlay-diagnostics-enable buffer +# lsp-enable-window +# #lsp-auto-hover-enable +# lsp-auto-signature-help-enable +# } +# hook global KakEnd .* lsp-exit + +hook global WinSetOption filetype=(javascript|typescript|json|css|html) %{ + set-option buffer formatcmd %sh{ echo prettier --stdin-filepath $kak_buffile } + hook buffer BufWritePre .* format-buffer +} + +source "%val{config}/plugins/zig.kak/rc/zig.kak" +hook global WinSetOption filetype=zig %{ + set-option buffer formatcmd "zig fmt --stdin" + hook buffer BufWritePre .* format-buffer +} + +#hook global WinSetOption filetype=zig %{ zig-auto-run buffer } + +hook global KakBegin .* %{ set-option global termcmd "footclient sh -c" } + +map -docstring "yank the selection into the clipboard" global user y " wl-copy" +map -docstring "paste the clipboard" global user p " wl-paste" +map -docstring "comment" global user c ": comment-line" +map -docstring "stop searching" global user h ": set-register slash ''" + +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' + +# ------------ +# Indentación +# ------------ + +source "%val{config}/plugins/smarttab.kak/rc/smarttab.kak" +hook global ModuleLoaded smarttab %{ + set-option global softtabstop 4 +} + +# 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} + } + } + } +} + +hook -group sleuth global BufOpenFile .* %{ sleuth } +hook -group sleuth global BufWritePost .* %{ sleuth } diff --git a/.config/kak/plugins/smarttab.kak b/.config/kak/plugins/smarttab.kak new file mode 160000 index 0000000..1dd3f33 --- /dev/null +++ b/.config/kak/plugins/smarttab.kak @@ -0,0 +1 @@ +Subproject commit 1dd3f33c4f65da5c13aee5d44b2e77399595830f diff --git a/.config/kak/plugins/zig.kak b/.config/kak/plugins/zig.kak new file mode 160000 index 0000000..06ec648 --- /dev/null +++ b/.config/kak/plugins/zig.kak @@ -0,0 +1 @@ +Subproject commit 06ec64885d7700be5c14c4adb2d36565bbdfc59d diff --git a/.gitmodules b/.gitmodules index 1439efc..25e8a99 100644 --- a/.gitmodules +++ b/.gitmodules @@ -34,3 +34,9 @@ [submodule ".config/nvim/pack/plugins/start/paige"] path = .config/nvim/pack/plugins/start/paige url = https://git.sr.ht/~leon_plickat/paige +[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 diff --git a/.profile b/.profile index 4da3baa..74594bc 100644 --- a/.profile +++ b/.profile @@ -12,7 +12,7 @@ export PATH="$HOME/go/bin:$PATH" export MOZ_ENABLE_WAYLAND=1 -export EDITOR=nvim +export EDITOR=kak export QT_WAYLAND_DISABLE_WINDOWDECORATION=1