AutoYADM commit: 2025-06-28 23:45:36

This commit is contained in:
Daniel Fichtinger 2025-06-28 23:45:36 -04:00
parent 53e52d8772
commit 9203b2b64a

View file

@ -125,14 +125,16 @@ set-option global tabstop 4
set-option global indentwidth 4 set-option global indentwidth 4
hook -once global WinSetOption filetype=kak %{ 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 declare-option str-list extra_kak_keywords addhl decl def compl eval exec rmhl rmhooks face set unset
eval %sh{ eval %sh{
join() { sep=$2; eval set -- $1; IFS="$sep"; echo "$*"; } join() { sep=$2; eval set -- $1; IFS="$sep"; echo "$*"; }
if [ -n "$kak_opt_extra_kak_keywords" ]; then 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" printf '%s' "add-highlighter shared/kakrc/code/extra_keywords regex (?:\s|\A)\K($(join "${kak_opt_extra_kak_keywords}" '|'))(?:(?=\s)|\z) 0:keyword"
fi 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 %{ hook global WinSetOption filetype=kak %{
@ -232,11 +234,13 @@ define-command goto-debug %{
map -docstring 'open debug buffer' global user d ':goto-debug<ret>' map -docstring 'open debug buffer' global user d ':goto-debug<ret>'
declare-filetype-mode kak
# TODO: automatically add -override for overridable commands?
define-command exec-selection %{ define-command exec-selection %{
execute-keys ':<c-r>.<ret>' execute-keys ':<c-r>.<ret>'
} }
map -docstring 'execute selection' global debug x ': exec-selection<ret>' map -docstring 'execute selection' global kak x ': exec-selection<ret>'
define-command repl %{ define-command repl %{
new %{ edit -scratch; set buffer filetype kak } new %{ edit -scratch; set buffer filetype kak }