-
Notifications
You must be signed in to change notification settings - Fork 799
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
talonfmt: raise maximum line length to 88 #990
Conversation
@phillco You could probably set up pre-commit to format with 100 on checkout and with 80 on commit? |
That would probably create a lot of spurious local changes, which probably would be detrimental. I think it should probably be consistent. My intent here is to propose that we simply set a higher value globally. |
I prefer shorter lines because I like to put things side-by-side on a laptop monitor. Even on a 15" monitor with a small-to-my-eyes font, 100 is slightly too long to put two windows side-by-side (with line numbers). And with a more normal-sized font, even 90 chars is too wide, with 88 chars just scraping in. So if we want to increase it, I vote for 88. I'm perfectly happy with 80, though. Example: |
If black uses 88 by default and we're already using black, then 88 has the advantage of being consistent across Python & .talon files as well :). |
I'd settle for 88 :) |
for more information, see https://pre-commit.ci
We should prob update editorconfig while we're here https://github.com/knausj85/knausj_talon/blob/4d39608dc9979017d7a0218b195feb54ff136ffa/.editorconfig#L10 |
Done. I also removed the redundant |
.editorconfig
Outdated
max_line_length = 88 | ||
|
||
[*.talon] | ||
max_line_length = 88 |
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.
Maybe we should just set max_line_length
to 88 globally, under [*]
?
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.
Should we keep 80 for [*.{md,yaml,yml}]
, or just use 88 everywhere for simplicity?
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'd say everywhere for simplicity.
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Michael Arntzenius <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Michael Arntzenius <[email protected]>
Opening for discussion.
I didn't notice the line length parameter until after #947 merged; we didn't discuss it much in that PR.
After I started using
talonfmt
in my own repositories, I've personally found a higher maximum length to be more ergonomic, as it means more commands can fit on a single line, which in my experience makes them easier to edit (although obviously having an autoformatter helps a lot). I've used 100 in axkit and in my own private repository and personally quite like the results.I thought I would open this PR to kick off the discussion. If 100 is too high for people, perhaps we could find a middle ground? For context, Black uses 88, so if we set 88 we will be consistent across both languages.
cc @wenkokke