-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add configuration for min width of line-numbers gutter #4724
Merged
Merged
Changes from 16 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
54f5914
adding settings for min and max line-numbers gutter width
dgkf ea094ed
removing max gutter width; adding verbose config options
dgkf 4539a8d
cleaning up unit tests
dgkf 568a69a
fixing lints
dgkf 4af6508
adding gutter tests
dgkf 9126fe0
fixing failing test
dgkf d8875d3
updating configuration book sections
dgkf 6e858ea
attempt to clean up deserialization of gutter configs
dgkf ed90b88
merging master
dgkf 7308a6b
fixing failing test
dgkf 7a265f0
updating book with diff gutter config section
dgkf 209ba4d
simplify GutterConfig serde; width => min_width
dgkf f0e5bf1
merging master
dgkf 9d198a0
remove gutter default inline comments
dgkf a48e92c
update line numbers width helper docs
dgkf c174b69
removing vestigial .into()s
dgkf 4f1393a
Applying review suggestion to: helix-view/src/editor.rs
dgkf 801df0d
rebasing changes onto suggestions
dgkf ead29e6
refactor to gutters line number; pull out common code
dgkf 097fd4f
remove unused use statement
dgkf c47e5cc
reduce redundant code
dgkf 2a5e6b9
rebase onto master
dgkf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about
[editor.gutters.breakpoints]
? I’m mentioning this because of what I’m doing in #5371 (I might eventually rebase on your work).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now the sub-sections are styled after the names that can be provided to
editor.gutters
. There's no real reason it must be like this, but it think there's some discoverability benefit to being consistent here.Following that style, both breakpoints and diagnostics would be configured in
editors.gutters.diagnostics
. I think it's best to follow this precedent, but I'd say this is a call for some of the more core contributors like @the-mikedavisLooking into the future a bit further, I think the underlying issue here is that diagnostics and breakpoints are a bit oddly coupled - likely a solution from before gutters were configurable. I think there's a case for decoupling diagnostics and breakpoints and trying to tackle that use case more generically. I think it would be interesting to be able to layer gutters as part of the layout. Perhaps something like:
Which would provide the current behavior. I think that needs more discussion before jumping to something like that, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m reimplementing #5371 rebased atop your PR then.