Lua Love
SublimeText Lua and Love2D package.
Details
Installs
- Total 30K
- Win 22K
- Mac 4K
- Linux 4K
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 | Aug 31 | Aug 30 | Aug 29 | Aug 28 | Aug 27 | Aug 26 | Aug 25 | Aug 24 | Aug 23 | Aug 22 | Aug 21 | Aug 20 | Aug 19 | Aug 18 | Aug 17 | Aug 16 | Aug 15 | Aug 14 | Aug 13 | Aug 12 | Aug 11 | Aug 10 | Aug 9 | Aug 8 | Aug 7 | Aug 6 | Aug 5 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 1 | 5 | 2 | 7 | 4 | 2 | 4 | 5 | 8 | 5 | 8 | 6 | 5 | 3 | 5 | 3 | 1 | 3 | 10 | 4 | 4 | 0 | 4 | 2 | 8 | 6 | 3 | 6 | 5 | 6 | 3 | 3 | 5 | 7 | 3 | 3 | 3 | 4 | 4 | 5 | 6 | 5 | 1 | 8 | 3 | 1 |
Mac | 0 | 2 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 2 | 2 | 0 | 0 | 1 | 0 | 0 | 2 | 1 | 2 | 0 | 0 | 0 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 1 | 1 | 3 |
Linux | 2 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 3 | 0 | 1 | 1 | 1 | 2 | 0 | 0 | 1 | 2 | 2 | 0 | 2 | 0 | 0 | 1 | 0 | 0 | 0 | 3 | 2 | 2 | 3 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 4 | 0 | 1 | 0 | 2 | 0 | 0 | 3 |
Readme
- Source
- raw.githubusercontent.com
Lua Love
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
- Open Command Palette (
Ctrl
+Shift
+P
orCmd
+Shift
+P
on Mac). Alternatively go toTools > Command Palette...
- Enter
Package Control: Install Package
- Find and install
Lua Love
package
Manual
- Go to
Packages
directory byPreferences > Browse Packages...
- 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 |