Skip to content

[FEATURE]: Add cursor_style configuration support in tui.json #38931

Description

@Retromadee

Verification

  • I searched for existing feature requests.
  • I discussed this in Discord (if there's an existing conversation).

Description

OpenCode currently hardcodes terminal escape sequences that force a block cursor shape, ignoring the native terminal cursor configuration (commonly beam/vertical line in Terminal.app, iTerm2, and other emulators). The TUI initialization in @opentui/core sets terminal raw mode and emits default escape sequences that reset user cursor preferences.

Proposed Solution

Expose a cursor_style key in tui.json config that accepts one of three values - beam, underline, or block - and emits the corresponding DECSCUSR escape codes during terminal initialization.

Example config:

{
  "$schema": "https://opencode.ai/tui.json",
  "cursor_style": "beam"
}

Alternative solutions

  • A settings popup in the TUI itself.
  • Using an environment variable to configure cursor shape.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions