diff options
author | Koichi Murase <myoga.murase@gmail.com> | 2024-01-22 19:56:44 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-22 10:56:44 +0000 |
commit | e484a68b8b740362a73d4e949806ffe9511ce0fe (patch) | |
tree | cffef03df27baf77a0fa012f784d2ac118cf5894 /atuin-client/config.toml | |
parent | d13b7c31c11643f95f2e5f402ed7337377dc9309 (diff) |
feat(search): make cursor style configurable (#1595)
* feat(search): make cursor style configurable
The vim mode of the interactive Atuin search changes the cursor style
on a mode change, but the current implementation has the following
issues.
* The terminal's cursor style set by the Atuin search remains after
Atuin exits. This causes an inconsistency with the shell's setting
for the cursor style.
* Also, the cursor style for each keymap mode is currently hardcoded
in the source code, which is not necessarily consistent with the
user's cursor-style setting in the shell.
* Since the current implementation does not set the cursor style for
the initial keymap mode but only sets the cursor style when the
keymap mode is changed, it also causes inconsistency in the cursor
style and the actual keymap when the shell's keymap and Atuin's
initial keymap mode are different.
This patch solves those issues by introducing an opt-in configuration
variable `keymap_cursor`. By default, the vim mode does not change
the cursor style because there is no way to automatically determine
the cursor style consistent with the shell settings. We enable the
feature only when the user specifies the preferred cursor style in
each mode in their config. Also, the cursor style is set on the
startup of the Atuin search (based on the initial keymap mode) and is
reset on the termination of the Atuin search (based on the shell's
keymap mode that started the Atuin search).
* chore(settings): remove dependency on crossterm
Diffstat (limited to 'atuin-client/config.toml')
-rw-r--r-- | atuin-client/config.toml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/atuin-client/config.toml b/atuin-client/config.toml index 9e097a418..d18d9783e 100644 --- a/atuin-client/config.toml +++ b/atuin-client/config.toml @@ -134,6 +134,11 @@ enter_accept = true ## the specified one. # keymap_mode = "auto" +## Cursor style in each keymap mode. If specified, the cursor style is changed +## in entering the cursor shape. Available values are "default" and +## "{blink,steady}-{block,underilne,bar}". +# keymap_cursor = { emacs = "blink-block", vim_insert = "blink-block", vim_normal = "steady-block" } + # network_connect_timeout = 5 # network_timeout = 5 |