diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-10-25 14:22:08 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-10-25 14:22:08 +0530 |
| commit | bf40ceb853eb590100fe5a82709d8be3b6c59d8d (patch) | |
| tree | c36da5e5b4b898a90ddef52b7245c6b39e6e9867 /autoload | |
| parent | aded6f2aebaacfd2face07831a76b7a91f76127a (diff) | |
| download | kakoune-config-bf40ceb853eb590100fe5a82709d8be3b6c59d8d.tar.gz kakoune-config-bf40ceb853eb590100fe5a82709d8be3b6c59d8d.zip | |
Disable word under cursor highlighting
Diffstat (limited to 'autoload')
| -rw-r--r-- | autoload/+init.kak | 10 | ||||
| -rw-r--r-- | autoload/cursor.kak | 22 | ||||
| -rw-r--r-- | autoload/cursorword.kak | 12 |
3 files changed, 22 insertions, 22 deletions
diff --git a/autoload/+init.kak b/autoload/+init.kak index 4012f0f..497e5a3 100644 --- a/autoload/+init.kak +++ b/autoload/+init.kak @@ -64,16 +64,6 @@ define-command enter-user-mode-with-count -params 1 %{ enter-user-mode %arg{1} } -# Mode cursors -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 -} } - # Code mode declare-user-mode code map global user c ':enter-user-mode code<ret>' -docstring 'Code mode' 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 <space><a-i>w <a-k>\A\w+\z<ret> +# 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 +} } diff --git a/autoload/cursorword.kak b/autoload/cursorword.kak deleted file mode 100644 index 9c30f99..0000000 --- a/autoload/cursorword.kak +++ /dev/null @@ -1,12 +0,0 @@ -declare-option -hidden regex curword - -hook global NormalIdle .* %{ - eval -draft %{try %{ - exec <space><a-i>w <a-k>\A\w+\z<ret> - set-option buffer curword "\b\Q%val{selection}\E\b" - } catch %{ - set-option buffer curword '' - }} -} - -add-highlighter global/ dynregex '%opt{curword}' 0:CurWord |
