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

Lua Love

by szensk ST2/ST3

SublimeText Lua and Love2D package. Deprecated.

Labels lua

Details

  • 2014.06.03.02.14.21
  • github.​com
  • github.​com
  • 4 years ago
  • 2 hours ago
  • 5 years ago

Installs

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

Readme

Source
raw.​githubusercontent.​com

Description

LuaLove is a package for Sublime Text 2/3 with support for the Love2D API. It is based on SublimeLove, LuaSublime, and lua_snippet.

Installation

You can install this package through Package Control, simply use Command Palette: Package Control Install Package -> Lua Love.

Alternatively, you can install this package by running the following command in your Packages directory:

git clone git://github.com/szensk/subllualove.git

Error checking

By default any Lua file will be run through luac -p and the first encountered error is outlined. The error is displayed in the status bar.

To disable or change this behavior

{
       "live_parser": true,
       "live_parser_style": "{dot|circle|outline}",
       "live_parser_persistent:" false,
       "luac_path": "luac"
}

in Lua Love > User Settings.

Syntax highlighting

alt text

Command Palette: Set Syntax: Lua (Love).

If you create a new shader, and make the argument a multi-line string, then Sublime will use C syntax highlighting for the GLSL within.

Snippets

There are snippets for most built-in Lua functions (ex: coroutine.resume), some LuaJIT functions (ex: bit.bor), and LuaDoc tags are available in comments. For example. “@param” expands to “– @param type name desc”.

Auto completion

Pressing Ctrl+Space in an open Lua file will show the autocompletions for the Love2D API as well as Lua function snippets.

Those Love2D functions which are not overloaded (only one possible argument combination), will fill in the argument names for you.

Build systems

Go to Tools > Build System and select “Love”.

  • Command Palette: “Love2D” will execute Love on the current project path (requires love on your system PATH).

  • Command Palette: “ldoc: File” will run ldoc on the current file (requires ldoc on your system PATH).

  • Command Palette: “ldoc: Project” will run ldoc on the current project (requires ldoc on your system PATH).

  • Build (Ctrl+B): execute current file with Lua.

  • Run (Ctrl+Shift+B): execute current file with LuaJIT (requires luajit on your system PATH).

The build system will automatically be selected for .lua files.