# loading extra configuration that requires dependencies, # not suitable for remote servers and whatnot require-module lsp evaluate-commands %sh{ kak-tree-sitter -dks --init $kak_session } colorscheme ashen evaluate-commands %sh{kak-popup init} # evaluate-commands %sh{ reflow init } # set-option global reflow_command %{ # cat > "${input=$(mktemp)}" # # reflow --width "$kak_opt_reflow_width" --tabstop "$kak_opt_tabstop" < "$input" || cat "$input" # fmt -u < "$input" | perl -CS -pe 's/([.!?])\s{2,}/\1 /g' || cat "$input" # rm -f "$input" # } require-module spell require-module hop-kak require-module fishr require-module title-bar require-module notes require-module plugins require-module yazi require-module luar set-option global luar_interpreter luajit # only set to foot if we are on wayland hook global ModuleLoaded wayland %{ set-option global termcmd 'footclient dash -c' } # needed for tree-sitter to respect show-matching define-command -override tree-sitter-user-after-highlighter %{ add-highlighter -override buffer/show-matching show-matching } # manually requiring needed for some reason 😢 # require-module peneira # declare-user-mode peneira # map -docstring %{ # Picker mode # } global user f ': enter-user-mode peneira' # map -docstring 'pick file' global peneira f ': peneira-files' # map -docstring 'pick unopened file' global peneira F ': peneira-files -hide-opened' # map -docstring %{ # pick line in buffer # } global peneira '/' ': peneira-lines' define-command -override -hidden consume %{ nop %sh{ niri msg action consume-or-expel-window-left } } define-command terminal-consume %{ terminal dash -c 'niri msg action consume-or-expel-window-left; exec fish' } alias global tc terminal-consume define-command -docstring %{ Create a new client in vertial split } new-consume %{ new consume } alias global nc new-consume alias global n new define-command -docstring 'open popup shell' popup-shell %{ popup fish } alias global pp popup-shell map -docstring 'popup shell' global user . ': popup-shell' require-module ui-mode try %{ evaluate-commands %sh{kak-lsp-diags} map -docstring 'enable diagnostic hover' global ui "'" ': lsp-diag-hover-enable' map -docstring 'disable diagnostic hover' global ui '"' ': lsp-diag-hover-disable' } define-command -docstring "New terminal in cwd" cwd-terminal %{ terminal fish } # make easy to open new shell alias global t cwd-terminal