Auto complete/import Modules & Services

hey! if you read my plugin’s code you can see that its very messy and hard coded which is why I decided not to do that

Update

  • Rewrote the whole plugin
  • Fixed all the bugs with previous version
  • Added a few optimizations
  • Added Auto complete for requiring modules
1 Like

This is a really nice module, thanks for making this

1 Like

Update

1 Like

Quick Update

  • If a module is inside the script the plugin will use script as the path when requiring the module

edit:

  • If a module is inside StarterPlayer.StarterPlayerScripts it will switch to Players.LocalPlayer.PlayerScripts (only in local scripts and module scripts and scripts with runcontext set to client)

Doesn’t this plugin already exists? Service Autocomplete (code completions)

Ah, I see but that I believe that was fixed, atleast for the latest version.

My plugin has more features to offer right now, please the read the post

At least this lets you get the modules, I will go use your’s

also I will modify your’s to make it work with my require() function which is this

local ReplicatedStorage = game:GetService("ReplicatedStorage")

require(ReplicatedStorage:WaitForChild("xAPI"))()

return function(name: string)
	local modules = getmodules()
	
	for _, v in modules do
		if v.Name == name then
			return require(v)
		else
			error("Got an invalid module")
		end
	end
end
1 Like

okay! modifying the plugin should be pretty easy, just look for the line where it does something like this and edit it to your liking

`local {moduleName} = require({path})`

This function seems suspiciously similar to mine :thinking: … took me months to figure this out so if this is based on my code please credit in some form :upside_down_face:

bro is trynna get the source code for himself :skull:

6 Likes

I did learn this method by reading your plugin’s code, nice job on finding this method its a good one, I’ll give you credit since you asked me to

Update

  • Fixed a bug with previous version where plugin couldnt detect if a module is a descendant of the script or not
  • Plugin shouldnt suggest modules that are already required anymore
1 Like

Update

Update

  • Module no longer outputs errors when you type in command-bar
  • The module that you’re writing in should no longer get suggested by the plugin

Can you make it so the autocomplete doesn’t go above these things --!strict, --!nocheck, and --!nonstrict if there is?

1 Like

I’ve published a fix for this, you can update the plugin now!

Wow, that was so quick! I didn’t expect it to be that quick!

1 Like

Small Update

  • Plugin shouldn’t suggest the same module twice anymore

I was feeling a lil lazy which is why it took me a while to do this update