Script Editor: Luau-Powered Autocomplete & Language Features Beta

A very good update and it is something we needed.



But I’m not a very big fan of its gigantic sizes.

1 Like

Are there plans to expose these sorts of features to plugins and/or release a stand alone LSP implementation? All these improvements are awesome but they aren’t life changing to people like me, who tend to not use Studio.

7 Likes

I am SO excited about this! Scripting on Roblox has always been pretty 50/50 with what you’re getting but this is going to be so much better for me and many other scripters. Thank you for this!

2 Likes

I haven’t had any issues with Roblox Studio on my M1 Mac Mini, and I’ve had it since December 2020. I haven’t experienced any weird glitches either. However, I have never used Roblox studio on a Windows PC so I might be biased. Also, I don’t do a ton of super-demanding work on Studio so you have to consider that as well. I do agree that there should generally be more support for MacOS because it’s quite popular.

2 Likes

Yes, we are exploring how we might expose these features to Plugins. Anyone interested in this should contact @Clasifex.

9 Likes

Well, looks great. This update can make my job simpler

2 Likes

Is there a configuration that will disable autocomplete while typing, but still allow the Invoke Autocomplete action to work?

2 Likes

Not yet, but that’s a good suggestion.

5 Likes

When I type else it brings up elapsedTime. I can workaround this by pressing ctrl.

6 Likes

Great update,it surely saves my time to finish my game

Edit: The auto-fill function still sucks comparing the old one after using for a period of time.
I may moved my project to VS code instead.

2 Likes

This will definitely help me save time, but it’s got some work to do…

If you rename something and try to autocomplete, it still gives the original name. For example, I named a RemoteEvent “SetCash”. I decided to rename it to “SetEventCash” but autocomplete kept suggesting I do “SetCash”. I also came across a problem where autocomplete suggested OnClientEvent, on a server script… same for local scripts.

If you have an if statement, for example like this:

if bool == true then
    print("True!")
end

and try to add an else/elseif then the autocomplete does not suggest it.

if bool == true then
    print("True!")
els -> suggests ElapsedTime and elapsedTime
end

Also, does the autocomplete learn from what you normally type out and have that as the first suggestion? I get that it goes through alphabetical order but having to go the extra step for ReplicatedStorage, FindFirstChild, and many more frequently used things is pretty frustrating.

1 Like

This is an amazing update. The old autocomplete sometimes took a while to catch up, it sometimes forgot about varaibles alltogether, and was just not the best to work with. This new autocomplete is so much better in many ways. I love the step you guys are taking with this. I love seeing improvements to the built-in script editor.

This opens up the possibility of opening autocomplete up to modules which I hope to expect in the distant future. edit: Turns out this exists and how I have my game’s codebase structured doesnt work well.

My one criticism is that when refrencing parts with [ ] doesnt work when it should.
QLg3LkJnPE

EDIT:
One thing I have noticed with the module autocomplete is that using a function to require a module based on a name that returns a module doesnt support autocomplete for that module. For example, I have a main function which allows me to require commonly used modules with just the name of it. It returns the module instance, but the autocomplete doesnt show anything for this. Is there something with types I could do or is this a bug with the system?

6 Likes

Really nice, but still cant wait for function and class templates. Would also be great to be able to finally establish metatables within types and create generic types that reference metatables without needing to use typeof() and create throwaway instances of such classes.
My hopes for the future would to be able to do things like this:

local MySet: Set<Part> = Set.new<Part>() -- or Set.new() :: Set<Part>
--...
MySet:Add(somePart)
print(MySet:Contains(otherPart))
print(MySet:Contains(2)) -- type warning, number is not a Part
local value = MySet:Pop() -- should recognize as Part? [Set.Pop(self: Set): T?] / [Set.Pop(self: Set<T>): T?]
if value then
   -- deduction as Part
   print(value.Name) -- type recognition here
end

and other use cases:
RBXScriptSignal<T...>, i.e. Heartbeat: RBXScriptSignal<number> as :Wait() returns number and :Connect(f: (T...?): ...any?) function parameter also accepts only number or nothing

3 Likes

Looks like the function and table are not type but replaced with any:
local func:function
local tb:table
It’s not work!
The rest is great!

1 Like

Yes, there are no types for a single function and table like that built in. Though you can create ones for yourself easily:

type Tfunction = (...any) -> (...any)
type table = {[any]: any}

Correction: You can’t declare a type with the name of function because it’s a reversed keyword, my bad.

1 Like

This- is amazing. I can’t wait to experiment with this.

1 Like

It’s a dream come true… except…

Are module script functions/variables going to autocomplete? Example:

local module
module.a = 2
return module

And in the main script, if I were to reference this module, would it autocomplete a? All of these fixes for me, were minor. I use modules often, and if this were implemented would be the biggest positive for me.

Edit:

Oh yes. Thanks Roblox, this is a update that we need.

2 Likes

Yes:
image

1 Like

@GeneralRelish

Is Go To Declaration a part of this feature update? (nvm just saw it in Gritty Details)

There’s a UX flaw with it’s functionality, when I hold CTRl I’m more likely to copy / paste a keyword rather than wanting to go to it’s declaration.

Vs code has this functionality but it’s different while Studio uses MouseButton1Down Vs code uses MouseClick or MouseButton1Up which prevents problems with users trying to copy / paste keywords

2 Likes

This is NiCe. Finally a good UpDaTe for the script editor.

You can click on the taskbar once to remove focus from studio (without minimizing it) and then take the screenshot.

1 Like