-
Notifications
You must be signed in to change notification settings - Fork 1.9k
assists: Promote module to folder #10211
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
Conversation
0b60e09 to
fede1a3
Compare
|
I'd call this something like "Turn |
Intellij Rust and emacs uses the word "promote". Though I'm not sure whether it is a good name either, maybe we should keepace with them? |
|
I assume both IntelliJ and Emacs had this function before the 2018 edition. At that time, you could view it as a 'promotion' since it wasn't possible to have submodules without it. Plus, I don't think reusing the terminology from them really helps anyone -- it's not like someone used to "promote" wouldn't understand "Turn |
|
I do think we need something like this, but I don't think it's a good idea to make it available anywhere in a module -- this adds a 💡 entry everywhere, which is unhelpful every time you don't invoke this assist. Let's re-use @vsrs's brilliant insight in #9735 and make the assist avialable only when the whole file is selected (ctrl+a). I've documented this and other tricks in matklad@46cdde7 |
cddf32c to
aa0d466
Compare
aa0d466 to
cd599ec
Compare
0d9a7b0 to
22abbe8
Compare
|
Thanks, looks great now! bors r+ |
|
changelog feature (first contribution) add assist to convert file module to directory |
10362: feat: Convert a/mod.rs into a.rs r=Veykril a=longfangsong This is the reverse operation of #10211.  Close #10143. Co-authored-by: longfangsong <longfangsong@icloud.com> Co-authored-by: 龙方淞 <longfangsong@icloud.com>

Close part of #10143.
This PR adds a assist to promote module to directory, which means make a .rs file module into a directory style module with the same name.