Skip to content

feat: add configurable cursor style for TUI textareas #11305

Description

@widdsun

Problem

Currently, the cursor style in OpenCode TUI is hardcoded. Users cannot customize the cursor appearance (block, line, underline) or control whether it blinks.

The underlying @opentui/core library already supports CursorStyle type ("block" | "line" | "underline") and CursorStyleOptions ({ style: CursorStyle, blinking: boolean }), but OpenCode doesn't expose this as a configurable option.

Proposed Solution

Add two new configuration options to the tui section of opencode.json:

  • cursor_style: "block" | "line" | "underline" (default: "block")
  • cursor_blink: boolean (default: true)

Example Configuration

{
  "tui": {
    "cursor_style": "underline",
    "cursor_blink": false
  }
}

Implementation

Apply the cursor style settings to all textarea components:

  • Main prompt textarea
  • Question textarea
  • Permission reject prompt textarea
  • Dialog prompt textarea
  • Export options textarea

Use Case

Users who prefer a stable underline cursor (common in many terminal applications) instead of the default blinking block cursor.

Metadata

Metadata

Assignees

Labels

opentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions