CodeEditApp / CodeEditApp/CodeEditSourceEditor

✨ Allow configuring a vertical gutter separator

未關閉
#378 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Swift
星號
719
分支
160
PR 合併指標
30 天內沒有已合併 PR

描述

### Description

Please allow API consumers to configure an optional vertical separator between the line-number gutter and the editor content.

Some editor designs use a thin solid or dashed line beside the line numbers. The separator needs to be drawn by the gutter itself because the gutter width changes as the document's line-number digit count grows. There is currently no public configuration for this, so matching such a design requires maintaining a fork of `GutterView`.

A backward-compatible configuration could keep the separator disabled by default and allow consumers to specify its color and drawing style. The exact API is open to the maintainers' preference.

### Alternatives Considered

- Overlaying a line outside `SourceEditor`. This cannot reliably follow the gutter because its width is managed internally and changes with the number of line-number digits.
- Making internal gutter layout properties public. A configuration option would expose less implementation detail.

### Additional Context

Our current use case is a 1 pt separator using `NSColor.separatorColor` with a `[1, 1]` dash pattern.

No matching open or closed issue was found before filing this request. Observed on current `main` at revision `1fa4d3c`.

### Screenshots

Not included.

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

Start by reading GutterView and the surrounding SourceEditor gutter layout and drawing code. Trace how gutter width changes with line-number digits, then define a backward-compatible optional separator with configurable color and drawing style; done means it remains disabled by default and follows the gutter boundary as its width changes.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
macos, swift
領域
design, desktop-dev
Issue 類型
功能
難度
3/5
預估耗時
1-2 天
活躍度
活躍
描述清晰度
基本清楚
新手友好度
68/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。