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

Option To Limit Code Width For Split Lines #4169

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CodeAX2
Copy link

@CodeAX2 CodeAX2 commented Dec 7, 2023

If code is determined to be split due to code_width, split the line to as if code_width was set to the value contained in code_split_width.

This gives users the ability to be lenient with determining when to apply line splitting. Once line splitting is required, strict rules can be applied. This is useful as users can now make sure splitting a line does not separate off only a few columns.

For example, using:

code_width = 75
code_split_width = 65

will only split lines over 75 columns, but split lines will be limited to 65 columns. This has the effect of ensuring the segment split onto a new line has at least 10 columns.

If code is determined to be split due to code_width, split the line to as if code_width was set to the value contained in code_split_width.
Copy link
Collaborator

@gmaurel gmaurel left a comment

Choose a reason for hiding this comment

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

You need to add some test files to show how it works

@micheleCTDE
Copy link
Collaborator

micheleCTDE commented Dec 8, 2023

Also can you add some examples of what you are trying to do? I don't understand the purpose of having two different line split lengths. I am not saying it is not useful, I am just trying to understand what problem this solves.

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.

None yet

3 participants