✨ Allow configuring a vertical gutter separator
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- macos, swift
- Domain
- design, desktop-dev
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Swift
- Stars
- 720
- Forks
- 162
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from CodeEditApp/CodeEditSourceEditor
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
CodeEditApp/CodeEditSourceEditor#377 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
CodeEditApp/CodeEditSourceEditor#376 · 1 comment ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 32/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 45/100
All issues in CodeEditApp/CodeEditSourceEditor
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
type: docs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
googleapis/google-cloud-swift#971 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bitcoindevkit/bdk-ffi#1125 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
mozilla-mobile/firefox-ios#35743 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
manaflow-ai/cmux#13417 ·