rust-lang / rust-lang/rust-analyzer

VSCode: Sort "mod.rs" to the top of directories

Open
#22,651 6 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

A-vscode C-feature S-blocked
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

The name of mod.rs (lack of preceding underscores unlike Python's __init__.py) makes VScode sort mod.rs somewhere into the middle of all the files in the directory, which makes finding it more difficult than it needs to be.

Other IDEs for Rust automatically put mod.rs to the top of its directory, see https://users.rust-lang.org/t/rename-mod-rs-to-mod-rs/37688/5
The extension for VSCode could do this as well.

While everyone could "just" implement their own workaround using one of the sorter plugins, integrating it into the plugin is worth a thought, because it would be more convenient and inherently concerns basically all users of the plugin.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.