From 1e204d36c1fab9884f65618ccca019d8cd5f9386 Mon Sep 17 00:00:00 2001 From: kj-sh604 Date: Wed, 16 Jul 2025 22:10:52 -0400 Subject: refactor: update `zsh-fast-syntax-highlighting` plugin --- .../\342\206\222chroma/-precommand.ch" | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 ".config/shell/zsh-fast-syntax-highlighting/\342\206\222chroma/-precommand.ch" (limited to '.config/shell/zsh-fast-syntax-highlighting/→chroma/-precommand.ch') diff --git "a/.config/shell/zsh-fast-syntax-highlighting/\342\206\222chroma/-precommand.ch" "b/.config/shell/zsh-fast-syntax-highlighting/\342\206\222chroma/-precommand.ch" new file mode 100644 index 0000000..7e85a06 --- /dev/null +++ "b/.config/shell/zsh-fast-syntax-highlighting/\342\206\222chroma/-precommand.ch" @@ -0,0 +1,17 @@ +# vim:ft=zsh:et:sw=4 + +local __first_call="$1" __start_pos="$3" __end_pos="$4" + +[[ "$__arg_type" = 3 ]] && return 2 + +(( __first_call )) && { + (( __start=__start_pos-${#PREBUFFER}, __end=__end_pos-${#PREBUFFER}, __start >= 0 )) \ + && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}precommand]}") + (( next_word = (next_word & ~2) | 4 | 1 )) +} || { + return 1 +} + +(( this_word = next_word )) +_start_pos=$_end_pos +return 0 -- cgit v1.2.3