Script Editor API - Full Release!

Hey Developers!

We are thrilled to announce that we are now beginning the full release of the Script Editor API!

This past summer, we released the beta for the Script Editor API. The team has since heard your feedback and has been hard at work to meet your needs!

We want to remind you that this is not the end of the API now that we have reached the start of full release and we highly encourage you to continue to send in any further API requests as a feature request!

Here are some of the functions which been released in the beta over the past few weeks which all developers will now have access to:

OpenScriptDocumentAsync(script: LuaSourceContainer): Tuple YIELDS
Requests that a Script Editor open the specified script. Returns (true, nil) if the request succeeds. Returns (false, string) if the request fails, with a string that describes the problem.
Learn More

CloseAsync(): Tuple YIELDS
Requests that the editor associated with this document close. Yields the current thread until the editor responds to the request.
Learn More

RegisterAutocompleteCallback(name: string, priority: number, callbackFunction: function): nil
Registers an Autocomplete callback callbackFunction named name with priority priority.
Learn More

DeregisterAutocompleteCallback(name: string): nil
Removes a previously registered callback with the name name. Documentation:
Learn More

For information on the rest of the APIs, please check out the following links:

Release Plan

The Script Editor API has begun rollout and is continuing to ramp up to 100% in the coming days. We will be paying close attention to any potential issues with the API throughout the rollout and beyond and deal with them accordingly. We are extremely excited to see what the community can build with these new tools!


A huge shout out to @code4xp, @swmaniac, @windy0724, and @1ceF1y as this would not have been possible without their amazing efforts!

Happy Scripting!

145 Likes

This topic was automatically opened after 10 minutes.

(post deleted by author​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​)

12 Likes

This update is amazing!
However, would it be possible to force the display of the autocomplete?
This would be useful when we need the user to enter a list of keywords like a path to a ressource.
Because after a user selected an option, the list disappears.

6 Likes

Try out my new Roact Complete plugin (Full code completion support for Roact stuff) using these APIs for a taste of what they can do!

19 Likes

when will this transform from script editor to vscode 2.0

5 Likes

RegisterAutocomplete is probably the most powerful API I’ve seen in a while

I was messing around with it when it still could only exist with one callback but its insane how powerful it really is

12 Likes

I’ve already got a few QOL plugin ideas with this new API. Can’t wait to see what other developers will make with this.

4 Likes

Excellent addition, I’m sure some pretty neat plugins will be made as a result.

4 Likes

Got something going now.

This plugin allows you to insert quick code snippets such as creating a part or doing some ray casting. Eventually I will add a feature to make custom code snippets. Maybe even edit the default snippets too.

2 Likes

Wow this update is amazing!

Thank you Roblox! Continue to offer us good updates like this one!

1 Like

This is like, really interesting.

1 Like

Epic update! I can see this being used for custom editors and more customized auto-complete for user-made frameworks! Can’t wait to see what’s next! :smiley:

4 Likes

Those seem pretty important! I will look into using it in the future!

3 Likes

Can the learnMore token in the autocomplete macros be allowed to go to github.io and github.com. For example: if I wanted to provide a help document for Roact.createElement, i’d set the Learn More link to API Reference - Roact Documentation

It would also be nice if child tokens in a struct had their parent struct referenced by name or a cyclic reference

7 Likes

I have a quick request, could you add a function for retrieving a callback from registered autocompletes?

Maybe: :GetRegisteredAutocompleteCallback("register_name")

I’m mainly asking this because you have no real way to check for existing registered autocompletes.

I know I can have my own method of tracking existing registers but I feel like it’ll be safer to be able to directly reference where these registers are being held for more accuracy.

Atm I’m just blind deregistering my callback by wrapping it in an xpcall.

3 Likes

Amazing update! This will bring alot of cool plugins to the platform (Like the one I am making :slight_smile:)!

2 Likes

LuaUtilities - Your friendly autocomplete manager.
I’ve made a new plugin!
This plugin includes a UI Which can Create and Manage custom autocompletions!
It features the use of the script editor for autocompletions, using a seperate script window for each!

It comes with 9 standalone autocompletions. Pre-Coded for you. But of course, You are free to edit these and even create new ones using the plugin.
They are:

  • ValueToIndex → Similar to table.find
  • debugPart → Code for a simple debug part.
  • randomChance → Code for generating percentage-based randomness
  • Variables → Code for essential variables like ReplicatedStorage.Events
  • hitBoxWhitelist → Creates an OverlapAPI hitbox with whitelist
  • hitBoxBlacklist → ^
  • rs → ReplicatedStorage
  • hitBox → OverlapAPI Hitbox
  • rayCast

For the future, I intend to add Game-Specific autocomplete and knit-integration.

Enjoy, Many Thanks, 3gData.

3 Likes

This is pretty good!
I do have a suggestion, could you add a unique tag at the beginning of the autocomplete?

“LuaUtils - ScriptName”
image
(Ignore the Snippets! autocomplete, from the plugin I’m working on.)

But the idea is that it helps separate what’s plugin and what’s native to the editor.

2 Likes

I could do this, But it could interfere with the overall Ease of use, for example having to type LuaUtils.

Maybe I’ll add something like LU, Or even allowing the prefix to be set manually, If any.

2 Likes