To the people using #zed for #rust development: Rust (new) module system uses module_name.rs + module_name/ (directory) for organizing modules and sub-modules, so it would make sense to NOT sort directories first in the project panel, so the file and dir for one module are next to each other and not the dir on top and the file elsewhere bellow. How to you configure it to have the natural sorting for #rust project?
Post
@corpsmoderne This has been added to avoid repeating `mod.rs` so many times in larger projects.
@michalfita I know, it wasn't what I asked.
@corpsmoderne This is why I don't use the new file with the same name as folder system. A project's file hierarchy shouldn't need special support in file viewers to be easy to follow.
Honestly I don't think I've noticed a popular Rust project that uses it. Zed, Leptos, Dioxus, Bevy, tokio all use mod.rs files.
@paul yeah in the current state of affairs I prefer the other pattern too. Actually half of my projects use one pattern and the other half the other it's a mess 😅
@corpsmoderne yeah it's unfortunate it got added imo, but I don't blame people for using it. The docs push it pretty hard.
It's important imo that there's only one way to do these kinds of things. Multiple ways to do it means third party tools have to support both, and can waste a lot of time with arguments over style in every project etc.
One of my favorite things about rust is rustfmt having one way things are formatted so people don't argue over formatting. Feels like a step away from that.
@paul they should allow a third pattern: module_name/module_name.rs and call it a day 😬
@corpsmoderne lol yeah I think that would have been slightly better than the new way, but also please don't add more lol.
@corpsmoderne I had never thought of it before but the same thing happens in VSCodium. There is a setting Explorer->Sort Order. But I don't use Zed.
@tuxmain it's puzzling that it's not the default for Zed as it's iteself coded in Rsut, they should have noticed by now X)