ulyssa / iamb

A Matrix client for Vim addicts
https://iamb.chat
Apache License 2.0
671 stars 46 forks source link

Feat: Cursor shape options #197

Open drjaska opened 10 months ago

drjaska commented 10 months ago

I'm not used to seeing a full block as my cursor when typing, everywhere it's nowadays a vertical line which splits characters, even in (neo)vim. It would be great to have this as a customisation option in iamb as I see vertical line cursors as the standard for this century.

                            *tui-cursor-shape*
Nvim will adjust the shape of the cursor from a block to a line when in insert
mode (or as specified by the 'guicursor' option), on terminals that support
it.  It uses the same |terminfo| extensions that were pioneered by tmux for
this: "Ss" and "Se".
Similarly, if you set the cursor highlight group with blend=100, Nvim hides
the cursor through the "cvvis" and "civis" extensions.

If your terminfo definition is missing them, then Nvim will decide whether to
add them to your terminfo definition, by looking at $TERM and other
environment variables.  For the "rxvt", "putty", "linux", "screen",
"teraterm", and "iterm" terminal types, or when Konsole, a libvte-based
terminal emulator, or genuine Xterm are detected, it will add constructed
"Ss" and "Se" capabilities.
ulyssa commented 10 months ago

Adding this as a config option sounds like a good idea! I think it should just be defaulting to whatever the terminal is configured to do at the moment. It looks like crossterm has options to configure the style.