How to run Lua using Atom text editor (Windows)

This post is superseded by Pocket Lua

You could go through these steps…

Or you could just get Pocket Lua!




Lua is pretty neat.

I frequently find myself using the lua demo website to test out small pieces of code.

Wouldn’t it be cool if there was an modern quick-to-open open-source text editor that could quickly run Lua?

Atom text editor is pretty neat.

It’s a modern text editor that supports plugins.
It’s also fairly quick to open.
With the Script package, you can use it to execute lua.

How to use Atom text editor to execute Lua:


  1. Install Atom

Go to atom.io and install the text editor.


  1. Install Lua for windows

Go to Releases · rjpcomputing/luaforwindows · GitHub
Download the latest Lua for Windows installer (currently the 2018 edition)

When installing, I recommend un-checkmarking the “Script Editors”
SciTE is an IDE with some cool features but you don’t really need it.
image


  1. Install the Atom Script package

Go to script and hit install


It should prompt you to open Atom
image
If it doesn’t, open Atom and go to File > Settings > Install
then search for the package “script” and hit install.


  1. Install the Atom Language-Lua package

Install the “language-lua package” from language-lua
Click on where it says “Plain text” by default.
image
Then search for and select Lua
image
Atom should now do Lua syntax highlighting.


  1. Give Atom access to environment variables

This is as simple as typing “atom .” into either your command prompt or Run window.
image
image
(Windows Key + R opens the run window)


Enjoy

image
You can execute the code you’re writing by either going to Packages > Script > Run Script or doing the keyboard shortcut CTRL + SHIFT + B

Now you can type up and execute simple Lua code whenever you want, without having to open Roblox Studio. Happy scripting!

8 Likes

Thanks! I’m trying it out :smiley: Awesome tutorial.

1 Like

Correct me if I am wrong, but this seems like a post that belongs in the #resources:community-tutorials category.

My command prompt said atom is not recognized as an internal or external command, operable program or batch file.

How do I fix this?

1 Like

@sympoll
Fixed!

@Sorbious
Did you follow step 1?
Go to https://atom.io/ and install the editor before doing anything else

I fixed it now by watching some tuturials in Youtube because the step 5 only says “Give Atom access to environment variables” and it doesn’t have any steps on how to put it in your system that’s why it outputs an error when I’m trying to enter “atom .

From my knowledge, running “atom .” in cmd should automatically give Atom access to environmental variables.
You won’t have access to that command without having Atom installed though.

Can you link the video you found for this?

It’s not actually a video tutorial for “Lua for Atom” but it was for Python but in my case, my only goal is adding the path of “atom .” on the PATH of my system.

But here is the link:

1 Like

Not working, I even have it installed.
Error
See I have it installed.
Atom

1 Like

I decided to make an easier text editor for running Lua.
Pocket Lua is out!