spend half an hour trying to find any issue tracking "do not reformat my comments" with rustc. first one i find on the subject https://github.com/rust-lang/rustfmt/issues/6497#issuecomment-2711705405

Thanks for the report. I'm fairly certain this is a duplicate, but I can't find the issue right now

marks as duplicate regardless

marks you as a duplicate

the current workstream https://github.com/rust-lang/rustfmt/issues/6688

Rust allows both line comments (//) and block comments (/* */) to be placed between nearly any tokens in the syntax

this is unlike other languages such as c++ which also allow this

However, rustfmt currently struggles to preserve or correctly handle comments in many of these positions

ok

Root Cause
Rust's flexible comment placement allows comments between virtually any tokens

you said this less than 200 bytes ago

The rustfmt team is aware of these limitations and actively discussing architectural improvements on Zulip.

you backquoted "Zulip" but don't link to the channel, which also isn't in the readme. there's also no workstream and most PRs recently are unreviewed

However, comprehensively solving comment formatting across all possible token positions would require significant architectural changes, active contributors with deep understanding of the codebase, and substantial time and effort investment.

so you're saying it's unmaintained and has immense tech debt

[Tracking] Comment preservation and formatting issues · Issue #6688 · rust-lang/rustfmt

Summary Rust allows both line comments (//) and block comments (/* */) to be placed between nearly any tokens in the syntax (e.g., pub(crate /* comment */), trait /* comment */ Name, pub // comment...

GitHub
@hipsterelectron smells like chatgpt
@haskal ok so rustfmt is dead then
@haskal i'm kinda mad bc i finally onboarded myself to zstd and then i find the biggest nerd snipe ever made. this hole was made for me specifically. it's my hole
@haskal so hear me out instead of a uniform flat config you describe a sequence of CST transforms each of which has its own config. also you can write your own CST transform and include it as a dev dependency. you can rip out all the default transforms and only run your own. transforms can do arbitrary CST modifications—if it's broken you can remove it for now and even patch it locally. this is rust so it all builds from source as a compiler driver against the currently active compiler. make a debugging tool that steps through changes to a file
@haskal https://github.com/cosmicexplorer/c-format-stream this was a joke that became the seed of a prank
GitHub - cosmicexplorer/c-format-stream: An almost-pure regex stream to format C and C-like code.

An almost-pure regex stream to format C and C-like code. - cosmicexplorer/c-format-stream

GitHub
@haskal https://github.com/cosmicexplorer/selectree this was not a joke and in fact is the one result from my independent study in compiler design
GitHub - cosmicexplorer/selectree: select all the trees!

select all the trees! Contribute to cosmicexplorer/selectree development by creating an account on GitHub.

GitHub
@hipsterelectron at least im not WONTFIX
@milo @hipsterelectron bold of you to assume youre not a duplicate of a WONTFIX
@hipsterelectron low key just callin' me extra :/
@hipsterelectron this type of thing is why i added a status:possibly-resolved label for nushell
@132ikl i think the issue is more that it seems completely unmaintained
@132ikl i'm kind of a brat but i would feel kind of upset about having that slapped onto my issue as an external indicator even if it's technically a useful triage category. making it a dependency of a specific workstream would mean concluding the workstream means it's fixed or it gets conclusively determined not to be a duplicate
@132ikl nushell is a bigger project and has a lot of issues idk about though. i feel a formatter is a little less complex than a language and unfortunately has necessarily this extra emotional weight bc it's modifying your language
@132ikl i want to make a rust formatter now..........................
@132ikl i could see myself spiraling over this
@132ikl yeah i could see myself doing this
[Tracking] Comment preservation and formatting issues · Issue #6688 · rust-lang/rustfmt

Summary Rust allows both line comments (//) and block comments (/* */) to be placed between nearly any tokens in the syntax (e.g., pub(crate /* comment */), trait /* comment */ Name, pub // comment...

GitHub