diff --git a/.config/kak/kakrc b/.config/kak/kakrc index fe9adb67..77e47fcd 100644 --- a/.config/kak/kakrc +++ b/.config/kak/kakrc @@ -125,14 +125,16 @@ set-option global tabstop 4 set-option global indentwidth 4 hook -once global WinSetOption filetype=kak %{ + # highlight extra keywords declare-option str-list extra_kak_keywords addhl decl def compl eval exec rmhl rmhooks face set unset - eval %sh{ join() { sep=$2; eval set -- $1; IFS="$sep"; echo "$*"; } if [ -n "$kak_opt_extra_kak_keywords" ]; then printf '%s' "add-highlighter shared/kakrc/code/extra_keywords regex (?:\s|\A)\K($(join "${kak_opt_extra_kak_keywords}" '|'))(?:(?=\s)|\z) 0:keyword" fi } + # highlight TODO: + add-highlighter window/todo regex '#\h*(INFO|NOTE|TODO|PERF|OPTIMIZE|PERFORMANCE|QUESTION|ASK):[^\n]*' 1:+a@ts_info } hook global WinSetOption filetype=kak %{ @@ -232,11 +234,13 @@ define-command goto-debug %{ map -docstring 'open debug buffer' global user d ':goto-debug' +declare-filetype-mode kak +# TODO: automatically add -override for overridable commands? define-command exec-selection %{ execute-keys ':.' } -map -docstring 'execute selection' global debug x ': exec-selection' +map -docstring 'execute selection' global kak x ': exec-selection' define-command repl %{ new %{ edit -scratch; set buffer filetype kak }