eval %sh{ kak-tree-sitter -vvvvv -dks --init $kak_session } evaluate-commands %sh{kak-popup init} colorscheme ashen # colorscheme one-dark # colorscheme mocha require-module fishr require-module surround try %{ set-option global ashen_dynamic_cursor true set-option global ashen_eol_cursor true } # disable clippy set-option global ui_options terminal_assistant=none hook global ModuleLoaded wayland %{ set-option global termcmd 'footclient sh -c' } # This gets overridden by editorconfig but we set sane default anyways set-option global tabstop 4 set-option global indentwidth 4 set-option global scrolloff 3,3 define-command -override tree-sitter-user-after-highlighter %{ add-highlighter -override buffer/show-matching show-matching } # make brackets gray a-la Ashen add-highlighter global/bracket regex [\[\]\(\)\{\}]{1} 0:rgb:737373 # special highlighting for escaped goodies in regex add-highlighter global/regex-escaped regex \\[\[\]\(\)\{\}fnrtv0\\dwshDWSH] 0:rgb:e5e5e5 # add-highlighter global/ show-matching hook global WinCreate .* %{ ui-wrap-enable ui-scrolloff-toggle add-highlighter window/number-lines number-lines -hlcursor -relative -separator " " add-highlighter window/show-whitespaces show-whitespaces -only-trailing # -lf "" -tab "" -only-trailing } map -docstring "quit" global user q ": q" map -docstring "quit" global normal ": q" map -docstring "force quit" global user Q ": q!" map -docstring "force quit" global normal ": q!" map -docstring "kill session" global normal ':kill' map -docstring "force kill session" global normal ':kill!' map -docstring "save" global normal ": write" map -docstring "save" global normal ": write!" # map -docstring "save" global normal ": write-all" # map -docstring "save" global normal ": write-all!" map -docstring "close current buffer" global user x ": db" map -docstring "goto previous buffer" global user m ": bp" map -docstring "goto next buffer" global user i ": bn" map -docstring "goto previous buffer" global normal ": bp" map -docstring "goto next buffer" global normal ": bn" # map global normal X "x" # map global normal ":exec vv" # map global normal ":exec vv" map global normal _ # map global normal # map global normal 'p' map -docstring "comment line" global normal "#" ": comment-line" map -docstring "comment block" global normal "" ": comment-block" map -docstring "format" global normal = ": format-buffer" map -docstring "format" global normal ": format-selections" # Case-insensitive Search map -docstring 'case insensitive search' global user '/' /(?i) map -docstring 'case insensitive backward search' global user '' (?i) map -docstring 'case insensitive extend search' global user '?' ?(?i) map -docstring 'case insensitive backward extend-search' global user '' (?i) # Arrow keys for menu selections # map -docstring 'Select next menu' global prompt # map -docstring 'Select previous menu' global prompt # hook global InsertCompletionShow .* %{ # map window insert # map window insert # hook -once window InsertCompletionHide .* %{ # unmap window insert # unmap window insert # } # } map -docstring 'Select to file end' global user N "GjL" map -docstring 'Extend to file end' global user n "gjl" define-command -docstring %{ Spawns a Zathura pdf preview and Typst watcher for the currently open Typst file } typst %{ nop %sh{ { "$kak_config/scripts/kak-typ-zathura.fish" -k -w "$kak_buffile" "$kak_client_pid" } > /dev/null 2>&1 < /dev/null & } } define-command -docstring "Create a scratch buffer" scratch %{ edit -scratch } alias global s scratch define-command -docstring "New terminal in cwd" cwd-terminal %{ terminal fish } alias global t cwd-terminal 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' map global normal '"_'