Sublime Text

Fast and customizable cross-platform code editor.

Sublime Text with Lua Love package on Linux

Lua Love package

The Lua Love Package provides syntax highlighting, snippets, autocompletion and build systems.

Installation

  1. Install Package Control and restart Sublime Text
  2. Press Ctrl+Shift+P to open the Command palette and enter Package Control: Install Package
  3. Wait until another input field appears and install the Lua Love package
  4. In the Command palette enable syntax highlighting with Set Syntax: LOVE
  5. Now select build system with Ctrl+Shift+B to LuaLove and then you can use Ctrl+B to start LOVE.
  6. Optional: Set LOVE syntax as default for all .lua files - ViewSyntaxOpen all with current extension as...LOVE
  7. Optional: If LOVE is not in your PATH variable, go to PreferencesPackage SettingsLua Love and add:
{
    "build_system.love.cmd": ["absolute/path/to/love/executable", "${project_path:${folder:${file_path}}}"]
}

Console output

By default the console in Sublime Text will not display any output, such as print() calls, until the LOVE application has been closed.

To make the console output display live add the following code to the top of your main.lua file, or inside conf.lua:

io.stdout:setvbuf('no')

Jumping to errors

If there was an error during execution, you can use the F4 (next error) and SHIFT-F4 (previous error) to go through the errors that lua encountered.

See also