AutoYADM commit: 2025-06-25 14:23:24

This commit is contained in:
Daniel Fichtinger 2025-06-25 14:23:24 -04:00
parent df6c0069c1
commit 57eb28d18c
2 changed files with 9 additions and 4 deletions

View file

@ -65,7 +65,6 @@ evaluate-commands %sh{
select set-face set-option set-register source trigger-user-hook try select set-face set-option set-register source trigger-user-hook try
unalias unmap unset-face unset-option update-option unalias unmap unset-face unset-option update-option
write write! write-all write-all-quit write-quit write-quit!" write write! write-all write-all-quit write-quit write-quit!"
aliases="addhl decl def compl eval exec rmhl rmhooks face set unset"
attributes="global buffer window current attributes="global buffer window current
normal insert prompt goto view user object normal insert prompt goto view user object
number-lines show-matching show-whitespaces fill regex dynregex group flag-lines number-lines show-matching show-whitespaces fill regex dynregex group flag-lines
@ -83,9 +82,6 @@ evaluate-commands %sh{
add-highlighter shared/kakrc/code/attributes regex (?:\s|\A)\K($(join "${attributes}" '|'))(?:(?=\s)|\z) 0:attribute add-highlighter shared/kakrc/code/attributes regex (?:\s|\A)\K($(join "${attributes}" '|'))(?:(?=\s)|\z) 0:attribute
add-highlighter shared/kakrc/code/types regex (?:\s|\A)\K($(join "${types}" '|'))(?:(?=\s)|\z) 0:type add-highlighter shared/kakrc/code/types regex (?:\s|\A)\K($(join "${types}" '|'))(?:(?=\s)|\z) 0:type
add-highlighter shared/kakrc/code/values regex (?:\s|\A)\K($(join "${values}" '|'))(?:(?=\s)|\z) 0:value" add-highlighter shared/kakrc/code/values regex (?:\s|\A)\K($(join "${values}" '|'))(?:(?=\s)|\z) 0:value"
if [ -n "$kak_opt_extra_kak_keywords" ]; then
printf '%\n' "add-highlighter shared/kakrc/code/aliases regex (?:\s|\A)\K($(join "${kak_opt_extra_kak_keywords}" '|'))(?:(?=\s)|\z) 0:keyword"
fi
} }
add-highlighter shared/kakrc/code/colors regex \b(rgb:[0-9a-fA-F]{6}|rgba:[0-9a-fA-F]{8})\b 0:value add-highlighter shared/kakrc/code/colors regex \b(rgb:[0-9a-fA-F]{6}|rgba:[0-9a-fA-F]{8})\b 0:value

View file

@ -20,6 +20,8 @@ declare-option -hidden bool on_server %sh{
define-command -override true nop define-command -override true nop
define-command -override false fail define-command -override false fail
# used by kakrc.kak to highlight as keywords
try %{ try %{
%opt{on_server} %opt{on_server}
colorscheme ashen-local colorscheme ashen-local
@ -122,6 +124,13 @@ set-option global tabstop 4
set-option global indentwidth 4 set-option global indentwidth 4
hook global WinSetOption filetype=kak %{ hook global WinSetOption filetype=kak %{
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
}
# make brackets gray a-la Ashen # make brackets gray a-la Ashen
add-highlighter window/bracket regex [\[\]\(\)\{\}]{1} 0:rgb:737373 add-highlighter window/bracket regex [\[\]\(\)\{\}]{1} 0:rgb:737373
# special highlighting for escaped goodies in regex # special highlighting for escaped goodies in regex