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

Don't limit max line length on .u scratch files #5242

Merged
merged 1 commit into from
Jul 24, 2024
Merged

Conversation

ceedubs
Copy link
Contributor

@ceedubs ceedubs commented Jul 22, 2024

The recently added .editorconfig sets a max line length of 120 characters for all file types. I found this to be
pretty frustrating when writing Unison scratch files. While writing Unison code my editor would seemingly randomly
create a new line, generating invalid Unison code. This came up more often when writing Doc values, since I tend to
write longer lines in prose than in code.

The formatting in scratch files is ephemeral, so I don't think that there is any good reason to force a max line length
on it.

The recently added `.editorconfig` sets a max line length of 120 characters for all file types. I found this to be
pretty frustrating when writing Unison scratch files. While writing Unison code my editor would seemingly randomly
create a new line, generating invalid Unison code. This came up more often when writing `Doc` values, since I tend to
write longer lines in prose than in code.

The formatting in scratch files is ephemeral, so I don't think that there is any good reason to force a max line length
on it.
@ceedubs ceedubs requested a review from sellout July 22, 2024 14:15
Copy link
Contributor

@sellout sellout left a comment

Choose a reason for hiding this comment

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

This looks good.

The original settings were created primarily for Haskell, but I figured it’s good for many programming languages, so I left it with *. But we could also constrain max_line_length (and possibly other settings) to *.hs and some other explicit extensions (e.g., I like to write Markdown without line breaks … but I don’t know if that’s the style at Unison or not).

In any case, I think this change on its own is an improvement.

@ceedubs ceedubs merged commit caf58fa into trunk Jul 24, 2024
34 of 35 checks passed
@ceedubs ceedubs deleted the editor-config-u branch July 24, 2024 13:54
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.

2 participants