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

Lua Love

by szensk ALL

SublimeText Lua and Love2D package. Deprecated.

Labels lua

Details

  • 2020.06.27.18.19.20
  • github.​com
  • github.​com
  • 2 weeks ago
  • 53 minutes ago
  • 7 years ago

Installs

  • Total 21K
  • Win 15K
  • Mac 3K
  • Linux 3K
Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12 Jun 11 Jun 10 Jun 9 Jun 8 Jun 7 Jun 6 Jun 5 Jun 4 Jun 3 Jun 2 Jun 1 May 31 May 30
Windows 6 10 5 6 12 8 6 9 13 6 6 9 5 15 10 13 9 8 5 8 15 7 8 13 6 12 11 12 9 8 10 5 6 8 9 9 16 3 7 6 10 5 7 7 5 10
Mac 0 1 1 1 0 0 2 0 0 2 1 2 0 0 0 0 1 0 1 2 0 4 0 0 2 1 0 2 2 1 0 1 0 1 1 0 0 0 0 1 0 0 1 2 0 2
Linux 1 0 2 2 1 0 0 1 4 0 2 0 1 0 1 1 1 3 1 1 0 3 1 0 1 2 2 0 0 1 0 0 1 1 1 0 2 1 0 0 0 0 0 0 0 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

Syntax hightlighting example

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. Or if you have GLSL syntax plugin, you can use it for hightlighting, but you must install it manually and edit file LuaLove.sublime-syntax: at line about 136 replace source.c with source.glsl

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.