The tagging would still work, but selected objects would be used as module ancestors aswell
you have to select them to tag them anyway, if you expect to use multiple modules in different scripts just tag them
and yeah you can focus on optimization, I just wanted to point out some stuff I noticed
if you do this
-- Services
local ServerScriptService = game:GetService("ServerScriptService")
-- Modules
local modA = require(script.modA)
modb -- import
it attempts to define modB in front of the services instead of in front of the other modules (and snaps the modules together possibly due to the sorting), which deletes the – Modules comment fore some reason
Regardless of what your shorthand is set to globally ! still works no matter what.
Setting the global shorthand to : no longer works for some reason.
Also, I noticed you used plugin.Deactivation and checked for the script being deleted to call the same function, unless I’m stupid (which I probably am), you should probably use plugin.Unloading for both cases instead.
Hi, the way the plugin is designed it always places the module after all other imports, no matter where you actually imported it, I’ll probably change this behaviour to instead maybe import on the first module import behind the current line, but currently yeah it is intended even with sorting off
Adding onto what he said, all services and modules should probably be required right after each other according to the Roblox Lua Style Guide, it’s all preference but it’s beneficial for organization and consistency, and it’s the way most people do it.
isInNonImportContext changed to loop thru lines instead of characters and utilize more string patterns, this reduced imports resolve time from sub 0.09s to sub 0.01s (for 1500 lines)
Added the ModuleSearchMode setting which can either be “descendants” or “children”, it is “children” by default but “descendants” may be desirable if you want to see all modules