CodeEditApp / CodeEditApp/CodeEditSourceEditor

✨ Allow configuring a vertical gutter separator

Đang mở
#378 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Swift
Star
719
Fork
160
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### 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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
macos, swift
Lĩnh vực
design, desktop-dev
Loại issue
Tính năng
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
68/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.