Nexus Embedded Editor - "Hacky" Method to Overlay External Editors over Roblox Studio

Background

I have seen more developers adopt using external editors for Roblox development with Rojo to sync files. The biggest blocker I had was constantly switching between Roblox Studio and external editors for testing and using tools in Roblox Studio. Nexus Git helped a bit with this by giving me access to Git repositories from inside Roblox Studio and an easy way to convert to using Rojo and external editors in the future. Unfortunately, Nexus Git started to suffer from “scope creep” (what the project was trying to accomplish increased a lot) as time went on to the point where making it robust enough for me to keep using would require months of work. During this, I thought “imagine if I could just put VS Code in front of Roblox Studio”. On Windows, this ended up being possible and I got some good results after an hour of work.

Nexus Embedded Editor

The result of this was a project I call Nexus Embedded Editor. Nexus Embedded Editor attempts to overlay external editors over Roblox Studio and open scripts automatically when they are opened in Roblox Studio.

For those looking for more technical information about what the server does to accomplish this, a technical details document exists.

Why?

A pain-point with development is switching between windows when testing an application. For example, developing a website requires switching between a text editor and a browser with the website open. While isn’t too bad in multi-monitor setups, slows down development for single-monitor setups like laptops.

Setup

Nexus Embedded Editor requires getting both the client and the server, and enabling the HttpService in Roblox Studio. All of the server binaries for Windows can be found under the GitHub releases. The system is set up so 1 binary and 1 plugin is set up for each editor, so you will need to pick the binary for your editor as well as the respective plugin. Right now, Nexus Embedded VS Code is the only one offered, but other editors can easily be supported.

If the editor you use or want to use it not supported, please either reply or create a GitHub issue with your editor you want and why you use it. Support for editors like Sublime text and Notepad++ will be accepted, but “inferior” editors like Notepad and WordPad won’t be accepted.

Plugin Usage

image
When using the plugin, two options exist on how it is set up. These include:

  • Connect - Opens up the editor and opens up scripts when they are opened up in Roblox Studio. The window is not moved in this state. If you use Rojo, this functionality is coming in version 0.6.
  • Attach - Connects the external editor and moves it in front of the Roblox Studio editor.

Do I Need Rojo?

With the initial design, Rojo was required to be set up to run so that Nexus Embedded Editor could determine what file to open. However, the design was modified to allow it to run without any project. If you open any script in Roblox Studio, it will open in the editor and sync back into Roblox Studio if it isn’t under a Rojo project. Be aware that the status of Rojo is not checked, and you may be making changes to scripts in the external editor without them appearing in Roblox Studio.

Cost

With the introduction of the plugin marketplace, I have started charging Robux for a period of time for new plugins. Since this plugin is relatively hacky and only works on Windows, I have decied to make the plugin free. If you want to support me for my Roblox development without Robux, I have launched a Patreon page.

81 Likes

Really gives the script editor a much needed face lift. Nice work.

4 Likes

This is actually amazing! Thanks!

3 Likes

This works great! I honestly didn’t expect a lot of features such as intellisense to work but to my surprise it does! Something I would like to see in the future, though it may not be possible, is a way to “stick” visual studio to the top of your window no matter what, that way you can edit things in the explorer while still preserving the text editor. Another feature I’d like to see is the ability to have the Windows application be in the background process, as well as to detect and attach as soon as Roblox Studio opens. I’ve run into the issue accidentally not starting up the Windows application before.
This resource has great potential and I would pay for something like this. Great work!

Edit: Upon more usage I’ve noticed a big bug when you put a space in the name of a script. It seems to error out and open up to files in visual code one for the first word then the second.

1 Like

I had some code to fix this… and I never tested it, and it appears it didn’t work. I have fixed it an published a new release. Be aware scripts and files with spaces sometimes breaks things and you should avoid it if you are intentionally adding spaces.

1 Like

This seems really cool, and I went to go check it out however it seems there’s a specific path that VSCode must be installed on. Would it be possible for you to support a command line argument, or some other configuration, to set a custom path to the VSCode exe/directory?

I have VSCode installed onto my D: drive since I have an SSD with minimal space for my actual OS.

With the current design, it can’t be done at the command line argument level since the first command line argument is used to specify the project file. I will spend some time tomorrow to try out some alternatives, like checking for code.exe in the system’s PATH environment, but I am not guaranteeing an update.

Edit: If you add the VS Code directory (not Code.exe, the directory containing it) to your system’s PATH, Nexus Embedded Editor will work.

2 Likes

Great work on the plugin!

Also, is there a way to change the window size of vscode when overlapping it on studio? My laptop screen isn’t as long as most others and it goes over other views.

1 Like

Resizing isn’t great with this setup. To do so, you need to first select Roblox Studio, resize the script editor window, and then focus the editor window again. Attempting to automate resizing of the Roblox Studio script editor was not something I wanted to try to implement.

I guess that’ll be an issue with my current views setup because I can’t shrink the explorer/property views any further, which leaves changing how the views are arranged or move them to the other side of the screen so that only the scrollbar is off the laptop’s screen.

1 Like

The explorer and properties windows seem oddly wide for the maximum size. There may be another window that has a max bounds that is oddly big, like Rojo. There isn’t much I can do on my end because I don’t have a way of knowing if a window was intentionally resized or Roblox Studio was intentionally resized and that it should resize to it.

3 Likes

Yep it was Rojo, closing it made vscode fit perfectly when attaching, thanks a lot!

3 Likes

This plugin is very buggy in team create places. Ill often loose the code that I was working on and be unable to get it back. I do not recommend using this in team create games!

1 Like

Doesn’t seem to work for me, it just threw a bunch of errors on me.

It looks like Roblox changed the behavior with HttpService:GetAsync() to not throw an error if the server returned a HTTP 4XX/HTTP 5XX error. I will create a bug report for this. If this is intended, I will update the plugin to address this.

1 Like

The bug mentioned above is actually a feature (GetAsync and PostAsync No Longer Error with HTTP Errors). I have updated the plugin to reflect the changes to behavior. All that is needed is to update the Roblox Studio plugin since the executable is the same.

1 Like

This is so awesome I really hate the roblox studio code editor!

Hi,
It seems like I’m running into another bug with the editor which causes the icons to not show up on the plugin bar.
Here is the error that is occouring:

Sorry for the trouble!

1 Like

This is most likely a problem with the underlying framework that I use, which I will be addressing soon-ish indirectly, but will back-port to fix this and several other plugins.

I expect to start this next week, but don’t expect the plugin to be fixed for 2 weeks or so. I am at the mercy of my school schedule, current project, and burnout.


At this point, I have ended support for the project. I am anticipating that the Roblox Studio detection will break at some point within the next year as it did in April. When this happens, I am not planning to fix it because of how much time it requires me to fix, as well as the fact I don’t use the plugin anymore (or really ever did. This was just one of those “this may work…” projects). The exception is for problems in Nexus Plugin Framework, which actually is blocking me from using some of my existing plugins. Problems in Nexus Plugin Framework will be addressed.

1 Like

Ended up being spot on with the prediction. The fix is up, which ended up being two-fold:

  • Something was wrong with the logic of how Nexus Plugin Framework wraps instances, which was patched but not fully corrected.
  • Some of the studio theme color enums were removed, which resulted in a syntax error.