This extension makes it easy to create and update Rust modules and submodules.
In the file explorer, right-click in the directory you want to create your new module or submodule.
Click "Create New (Sub)module".
Enter the name of your new (sub)module.
Adding a trailing . or .rs will create a new submodule file.
Adding a trailing / or no trailing symbol will create a new module directory with a new inner mod.rs file.
Select the access modifier for your new (sub)module.
New (sub)module is now created and added to the top of existing mod.rs.
If there is no existing mod.rs file, it will try to add mod line to lib.rs then will try main.rs.
Features
Simple context-menu shortcut to create a new module or submodule
Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.
Requirements
None
Extension Settings
This extension contributes the following settings:
rustModCreator.autoFocus: Automatically focus the newly created module file in the editor.
Known Issues
Cannot create new module from command because of issue with selected path