ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Lua Love

by szensk ST3

SublimeText Lua and Love2D package.

Labels lua

Details

Installs

  • Total 30K
  • Win 22K
  • Mac 4K
  • Linux 4K
Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7
Windows 2 5 3 13 3 6 2 0 0 2 6 3 7 2 4 4 6 4 5 2 5 7 1 4 5 2 2 7 2 7 4 3 4 7 6 4 3 3 5 4 2 5 4 8 6 4
Mac 0 0 0 2 1 0 0 0 0 1 0 0 1 1 0 3 4 1 3 1 2 2 0 0 0 0 2 0 1 1 0 0 1 3 0 0 1 0 0 1 1 0 1 0 0 1
Linux 0 0 0 1 0 3 0 0 0 0 2 1 2 0 2 0 0 0 0 1 0 2 0 2 0 0 1 1 0 0 1 0 2 0 1 1 0 2 0 0 0 2 2 0 0 1

Readme

Source
raw.​githubusercontent.​com

Lua Love

LOVE Downloads

LuaLove is a package for Sublime Text which brings LÖVE 2D API syntax highlighting and more. It is based on SublimeLove, LuaSublime, and lua_snippet.

Features

  • LÖVE 2D syntax highlighting (including GLSL shaders code, ffi.cdef and LDoc comments)
  • Auto completions with metadata (see below)
  • Some Lua snippets
  • Errors highlighting (configurable)
  • Build systems (configurable)

Installation

Using Package Control

  1. Open Command Palette (Ctrl+Shift+P or Cmd+Shift+P on Mac). Alternatively go to Tools > Command Palette...
  2. Enter Package Control: Install Package
  3. Find and install Lua Love package

Manual

  1. Go to Packages directory by Preferences > Browse Packages...
  2. Download and extract .zip or clone git repository by running:
git clone git://github.com/szensk/subllualove.git

Settings

Settings are saved in JSON format. You can change settings in Preferences > Package Settings > Lua Love or by running Preferences: LuaLove Settings in command Palette.

Error checking

By default any Lua file or file with LOVE syntax will be run through selected live parser and the first encountered error (if any) is highlighted. The error is displayed in the status bar and from Sublime Text 4 also in annotation.

Syntax highlighting

Set syntax using View > Syntax > LOVE or in command palette Set Syntax: LOVE.

If you are using shaders and wants better GLSL syntax highlighting, install some GLSL syntax plugin, as if no GLSL syntax is found, it will fallback to C syntax. C code in ffi.cdef is highlighted as C.

Auto completions and snippets

There are auto completions for LOVE functions and variables (like love.graphics.setColor), Lua and LuaJIT functions and variables (like coroutine.resume, ffi.cdef, bit.bor). Functions and variables have metadata - kind (function, variable, …) and details with link to the manual displayed since Sublime Text 4.

Pressing Ctrl+Space (Cmd+Space on Mac) in an open Lua file or file with LOVE set as syntax will show the auto completions for the Löve2D API as well as Lua function snippets.

To enable auto completions for LDoc without pressing Ctrl+Space (Cmd+Space on Mac), add {"selector": "comment.block.documentation.lua"} to auto_complete_triggers in settings.

Build systems

Build systems are available there to launch your project by just pressing Ctrl+B (Cmd+B on Mac) or F7.

To set up build system, go to Tools > Build System and select LuaLove.

If you don't have love in your PATH or you would like to tweak some build system settings, see build_system.(variant).* options in settings

Variants

First time you build your project, you will be asked to select one of the variants described below. You can change them anytime by pressing Ctrl+Shift+B (Cmd+Shift+B on Mac)

Build system variant Description
LuaLove starts LÖVE 2D in current opened folder
LuaLove - LuaJIT Run File runs current file using LuaJIT
LuaLove - Lua Run File runs current file using Lua
LuaLove - ldoc: File runs ldoc with current file and outputs markdown file in doc folder
LuaLove - ldoc: Project runs ldoc with src folder in current opened folder and outputs markdown files in doc folder