colorscheme mygruvbox add-highlighter global/ number-lines -hlcursor # Highlight trailing whitespace # Softwrap long lines add-highlighter global/ wrap -word -indent -marker ">>>" add-highlighter global/ show-whitespaces set-option global ui_options terminal_status_on_top=true set-option global tabstop 4 set-option global indentwidth 4 set-option global scrolloff 1,3 # Clipboard management mappings 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 "Show filetype" global user t ': echo %opt{filetype}' map -docstring "Open file" global user o ': tmux-repl-vertical "echo ""evaluate-commands -client %val{client} e $(fzf)"" | kak -p %val{session}"' map -docstring "Zeile auskommentieren" global normal ":comment-line" map -docstring "Speichern" global normal ":w" map -docstring "Beenden" global normal ":q" map -docstring "Cursor nach oben erweitern" global normal "" map -docstring "Cursor nach unten erweitern" global normal "" map global normal '|echo "$(($kak_selection + 1))"' map global normal '|echo "$(($kak_selection - 1))"' # hook global InsertCompletionShow .* %{ # try %{ # # this command temporarily removes cursors preceded by whitespace; # # if there are no cursors left, it raises an error, does not # # continue to execute the mapping commands, and the error is eaten # # by the `try` command so no warning appears. # execute-keys -draft 'h\h' # map window insert # map window insert # map window insert # hook -once -always window InsertCompletionHide .* %{ # unmap window insert # unmap window insert # unmap window insert # } # } # } # Convert spaces to tabs hook global BufWritePre .* %{ try %{ execute-keys -draft '%@' } } # hook global BufWritePost .* %{ # echo %sh{ sassc main.scss > main.css } # } eval %sh{kak-lsp} lsp-enable lsp-inlay-diagnostics-enable global declare-option str fim_tmp "/tmp/kak-fim.buf" define-command fim-complete -docstring "FIM-Completion am Cursor (Mistral)" %{ write -force %opt{fim_tmp} execute-keys "!python3 %val{config}/mistral-fim.py %opt{fim_tmp} %val{cursor_line} %val{cursor_column}" } map global user f ': fim-complete' -docstring 'FIM complete'