Skip to content
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

FormatBar: absorb line width guide settings #1237

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

danirabbit
Copy link
Member

Move this setting to the FormatBar since people may want to adjust this per-file and can be overwritten by editorconfig.

In a future branch, set item sensitivity when overwritten by editorconfig

@danirabbit danirabbit requested a review from a team January 14, 2023 01:52
@jeremypw
Copy link
Collaborator

jeremypw commented Jan 14, 2023

Not sure about discoverabiity here - max line width seems unrelated to current line number and goto line number. I agree that as it a possible .editorconfig setting it belongs in the FormatBar though. Adding another button would conflict with attempts to reduce the minimum size so I am not sure what the best solution is.

Removing it from the preferences menu seems inconsistent to what was done with indent-size and indent-type which are still there.

@Marukesu
Copy link
Contributor

Not sure about discoverabiity here - max line width seems unrelated to current line number and goto line number. I agree that as it a possible .editorconfig setting it belongs in the FormatBar though. Adding another button would conflict with attempts to reduce the minimum size so I am not sure what the best solution is.

Maybe together with the tab size and tab style? since they all are about code style.

@jeremypw
Copy link
Collaborator

jeremypw commented Feb 9, 2023

@danirabbit What do you think of @Marukesu 's idea?

Copy link
Collaborator

@jeremypw jeremypw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uncertainties regarding appropriate location and discovery need addressing (see comments)

@jeremypw
Copy link
Collaborator

jeremypw commented Aug 2, 2023

The .editorconfig setting max_line_length is intended to force "hard line wrapping" at the specified line length according to https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties. Code does not currently support this. It does not even support soft line wrapping at a specified width - only at the edge of the widget. The only thing the "max width" setting currently does is allow drawing of a shaded line width guide. I guess we could (mis)use the editor-config setting to set the line-width guide on a per document basis. If this can change per document then there is probably no choice but to add another button to the FormatBar to make this visible to the user. If necessary the FormatBar could split like the SearchBar when the window width is insufficient.

The first task is to actually make the line-width guide settable per document and to follow the editorconfig setting in preference to the global app setting (like tab width).

@jeremypw jeremypw marked this pull request as draft August 2, 2023 14:58
@jeremypw
Copy link
Collaborator

jeremypw commented Aug 2, 2023

Converting to draft as there a unresolved questions regarding the design and groundwork needs doing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants