I made a plugin that automatically requires ModuleScripts for you, and also gets the necessary Services for the requirement. This is the first plugin I have ever released, so if you find any bugs, please let me know!
Features:
Autocompletes ModuleScripts via auto-completion selection
Imports show up when they shouldnât
Imports show up when defining var names, in multiline strings, in function name definitions, in for loop params, and in function params, just places where you 100% donât want any imports
Tho it doesnât show up in multiline comments and singleline strings so all you gotta do is extend this
Auto import doesnât work if an unrelated variable has the same name
It should only be disabled if an import of the same name has the same var name, tho itâs not much of a problem ig
Autocomplete does not change if the names/locations of any modules are changed
Lets say I enabled the plugin with some module in ReplicatedStorage called MyModule and i renamed it to MyModuleCool, the autocomplete does not reflect that change.
Same thing for if i move it somewhere else, the path does not change
If a module name has punctuation other than _ or any other special character, the path name is not changed into a string computed access
Lets say I have a module named âMy Moduleâ, the plugin autocompletes this as the path: ReplicatedStorage.My Module
When it really should be ReplicatedStorage["My Module"]
Plugin does not find the shortest path
Lets say I wanna require a module which is inside script, youâd expect the path to be script.MyModule, but since the plugin is game-relative that means itâll always use the global path instead of the script-relative one
Plugin does not care about order
If i define multiple things after one another, this happens:
All of these are issues which arenât present in my own plugin SimpleComplete tho this is a pretty good beginner plugin so thumbs up
Thanks for the honest feedback! I will try to fix all the bugs you mentioned and update the plugin as soon as possible! I just did not test the plugin enough I think
Import context validation fails in multiline comments, multiline strings (in the line of the closing bracket ]]), and in for counter loop args (should only be invalid when for var| = 10, however for all the other args it should import)
Import priorities are too high
Ideally the priority of imports should be far below the normal completion items, as normal items are more likely to be used so imports would just be obstructing
Having service names to anything other than their GetService name breaks the plugin