Skip to content

Add configurable cursor shape via settings.cursor_shape#587

Open
xsa-dev wants to merge 1 commit intoulyssa:mainfrom
xsa-dev:review-issue-197-on-github
Open

Add configurable cursor shape via settings.cursor_shape#587
xsa-dev wants to merge 1 commit intoulyssa:mainfrom
xsa-dev:review-issue-197-on-github

Conversation

@xsa-dev
Copy link
Copy Markdown

@xsa-dev xsa-dev commented Mar 13, 2026

Summary

Add a new settings.cursor_shape option to configure the terminal cursor shape used by iamb.

Supported values:

  • default
  • block
  • line
  • underline

Changes

  • add CursorShape config enum with serde parsing
  • add cursor_shape to Tunables / TunableValues (including merge + default handling)
  • apply selected shape in TTY setup using crossterm::cursor::SetCursorStyle
  • restore terminal cursor style to default on exit
  • document the new setting in docs/iamb.5
  • add cursor_shape = \"default\" to config.example.toml
  • add unit test coverage for parsing (test_parse_cursor_shape)

Motivation

Closes a long-standing request to support non-block cursors and allows users to match their terminal/editor preferences.

Closes #197

Copy link
Copy Markdown
Contributor

@VAWVAW VAWVAW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works as described but I'm not sure that this is the best way to implement it. I believe there should at least be an auto option to change the cursor shape depending on the vim mode (i.e. block in normal mode, line in insert mode and underline in replace mode). Since I believe that modalkit doesn't expose the current mode, it would make more sense to implement this in modalkit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feat: Cursor shape options

2 participants