Skip to content

Set max_term_width to 80#128

Merged
NathanLovato merged 3 commits intoGDQuest:mainfrom
fstxz:max-term-width
Oct 4, 2025
Merged

Set max_term_width to 80#128
NathanLovato merged 3 commits intoGDQuest:mainfrom
fstxz:max-term-width

Conversation

@fstxz
Copy link
Copy Markdown
Contributor

@fstxz fstxz commented Oct 4, 2025

Closes #127

This required enabling wrap_help feature for clap.

@docwhat
Copy link
Copy Markdown
Contributor

docwhat commented Oct 4, 2025

Ah, you beat me to figuring that out. The clap docs took a little to read.

I don't think the max_term_width is needed. Once gdscript-formatter honors the terminal width (wrap_help), everything looks better.

I have a competing PR #129 that makes that change and then improves the help text (and makes the code more readable).

@fstxz
Copy link
Copy Markdown
Contributor Author

fstxz commented Oct 4, 2025

I don't think the max_term_width is needed. Once gdscript-formatter honors the terminal width (wrap_help), everything looks better.

It will still be hard to read when the terminal takes whole screen's width. I think it is needed.

@docwhat
Copy link
Copy Markdown
Contributor

docwhat commented Oct 4, 2025

It will still be hard to read when the terminal takes whole screen's width. I think it is needed.

Ah, like a developer who has a terminal open at 300 columns? That makes sense.

How about setting it to 100 or 120, then? It gives the developer some choice but prevents insanity.

Though if a developer has a 300-column terminal, they are probably used to things being nigh unreadable.

@fstxz
Copy link
Copy Markdown
Contributor Author

fstxz commented Oct 4, 2025

How about setting it to 100 or 120, then? It gives the developer some choice but prevents insanity.

What insanity? You wrote in the issue that 80 is the convention.

Comment thread src/main.rs Outdated
@NathanLovato
Copy link
Copy Markdown
Contributor

Thanks for the help as always! I bumped the number to 120 as it controls the max allowed text width, so it will still be 80 columns for someone who uses a small or split terminal view with 80 columns, and scale up to 120 for someone who wants a little more space. Hopefully that'll make terminal users happy.

@NathanLovato NathanLovato merged commit 95bc571 into GDQuest:main Oct 4, 2025
TranquilMarmot pushed a commit to TranquilMarmot/GDScript-formatter that referenced this pull request Oct 5, 2025
* Set `max_term_width` to 80

* Update src/main.rs

---------

Co-authored-by: Nathan GDQuest <nathan@gdquest.com>
@fstxz fstxz deleted the max-term-width branch October 7, 2025 16:57
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.

--help should be reformatted to fit within 80 columns

3 participants