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

Lua Love

by szensk ALL

SublimeText Lua and Love2D package. Deprecated.

Labels lua

Details

  • 2014.06.03.02.14.21
  • github.​com
  • github.​com
  • 6 years ago
  • 3 hours ago
  • 6 years ago

Installs

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

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.