CodeEditApp / CodeEditApp/CodeEdit

✨ Cursor Customization

オープン
#1,120 コメント 5 件 リアクション 0 件 担当者 1 名 @bombardier200 が担当を希望しています GitHub で見る
enhancement
主要言語
Swift
スター
23k
フォーク
1.2k
PR マージ指標
30日以内にマージされた PR はありません

説明

### Description

We should allow the user to customize their cursor both in the editor and in the terminal.

These customizations include:
- Cursor shape
- Bar
- Underline
- Block
- Cursor thickness (if shape is Bar or Underline)
- Rounded corners
- Cursor color (active and inactive)
- Accent Color
- Neutral
- Cursor transition between positions
- Cursor blink style
- Blink
- Smooth
- Phase
- Expand
- Solid (no blinking)

The blink styles [seen in VS Code](https://chrisoncode.hashnode.dev/animating-your-vs-code-cursor-with-cursor-blinking) are:

| Style | Preview |
| - | - |
| Blink | blink |
| Smooth | blink |
| Phase | blink smooth |
| Expand | blink expand |
| Solid | blink |

We might experiment to offer other variations of these (maybe phase+expand for example).

I’d imagine there are many possible ways this can be configured. We might provide the following configurations, we could even use these configurations internally to create presets and then allow the user to add a custom style by playing with these values shown below.

| Configuration | Default (Blink) | Smooth | Phase | Expand | Solid |
| ----------------------------- | --------------- | ------ | ----- | ------ | ----- |
| blink on duration | 0.5s | 0.5s | 0.5s | 0.5s | 0.5s |
| blink off duration | 0.5s | 0.5s | 0.5s | 0.5s | 0.5s |
| transition in duration | 0s | 0.05s | 0.2s | 0.2s | 0s |
| transition out duration | 0s | 0.05s | 0.2s | 0.2s | 0s |
| opacity at on state | 1 | 1 | 1 | 1 | 1 |
| opacity at off state | 0 | 0 | 0 | 0 | 1 |
| vertical scale at on state | 1 | 1 | 1 | 1 | 1 |
| vertical scale at off state | 1 | 1 | 1 | 0 | 1 |
| horizontal scale at on state | 1 | 1 | 1 | 1 | 1 |
| horizontal scale at off state | 1 | 1 | 1 | 1 | 1 |

@CodeEditApp/maintainers What are your thoughts around this?

### Considerations

This applies to both our editor which uses [STTextView](https://github.com/krzyzanowskim/STTextView) and the terminal which uses [SwiftTerm](https://github.com/migueldeicaza/SwiftTerm). I've created [this discussion](https://github.com/migueldeicaza/SwiftTerm/discussions/279) in SwiftTerm to discuss how this might be done in coordination with their project.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。