From bf40ceb853eb590100fe5a82709d8be3b6c59d8d Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sat, 25 Oct 2025 14:22:08 +0530 Subject: Disable word under cursor highlighting --- autoload/cursor.kak | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 autoload/cursor.kak (limited to 'autoload/cursor.kak') diff --git a/autoload/cursor.kak b/autoload/cursor.kak new file mode 100644 index 0000000..d3abd3b --- /dev/null +++ b/autoload/cursor.kak @@ -0,0 +1,22 @@ +# declare-option -hidden regex curword + +# Highlight word under cursor +# add-highlighter global/ dynregex '%opt{curword}' 0:CurWord +# hook global NormalIdle .* %{ +# eval -draft %{try %{ +# exec w \A\w+\z +# set-option buffer curword "\b\Q%val{selection}\E\b" +# } catch %{ +# set-option buffer curword '' +# }} +# } + +# Change cursor face based on mode +hook global ModeChange .*:.*:insert %{ + set-face window PrimaryCursor InsertCursor + set-face window PrimaryCursorEol InsertCursor +} +hook global ModeChange .*:insert:.* %{ try %{ + unset-face window PrimaryCursor + unset-face window PrimaryCursorEol +} } -- cgit v1.3.1