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

Remove horizontal scrolling in the rust code blocks #2013

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

1dimir
Copy link
Contributor

@1dimir 1dimir commented Apr 21, 2024

  • Reduce max_width for rustfmt: 85 -> 81 - to fit into blocks with line numbers;
  • Apply rustfmt for code chunks with long lines;
  • Reorganize long use statement;
  • Manually wrap long strings in macros;

#2012

* Reduce `max_width` for `rustfmt`: 85 -> 81 - to fit into blocks with line numbers;
* Apply `rustfmt` for spilling code chunks;
* Reorganize long `use` statement;
* Manually wrap long strings in macros;
@1dimir
Copy link
Contributor Author

1dimir commented Apr 21, 2024

That's funny. 81 produces a lot of false positives and 85 wants to reconstruct back the wrapped expressions. And I'm not certain, if to use #[rustfmt::skip] for those is the right idea.

@mgeisler
Copy link
Collaborator

As mentioned in #2012, dprint fmt should be used to format both Rust and Markdown code consistently.

Copy link
Collaborator

@mgeisler mgeisler left a comment

Choose a reason for hiding this comment

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

Let's put this on pause until we're done discussing in #2012.

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

2 participants