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

Lua Dev

by rorydriscoll ST2/ST3

Various support files for making developing Lua using Sublime Text 2 more pleasant.

Labels lua

Details

  • 2014.12.08.21.51.53
  • github.​com
  • github.​com
  • 3 years ago
  • 3 hours ago
  • 5 years ago

Installs

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

Readme

Source
raw.​githubusercontent.​com

LuaSublime

A collection of various different support files useful for use when programming in Lua using Sublime Text 2.

Installation

These files should be placed into the Lua package directory. For those on OS X, this can be found at:

/Users/[USERNAME]/Library/Application Support/Sublime Text 2/Packages/Lua

For Windows, this directory is here:

C:\\Users\\[USERNAME]\\AppData\\Roaming\\Sublime Text 2\\Packages\\Lua

Contents

Syntax Coloring

Lua.tmLanguage Lua.JSON-tmLanguage

These files define a language grammar for syntax highlighting lua files. Compared to the one that ships with Sublime Text, you get the following:

  • More tokens: Things like function calls and variables are now tagged, so they will show up correctly colored.
  • Better scopes: Most blocks now have some nested scoping support. This means that if the carat is on a variable in an if-block inside a function inside another function, then it knows this. This doesn't affect the coloring, but if you use the 'expand selection to scope' command then you will find that you'll get far better matches now.

For comparison, here's how the old syntax-highlighting looks with the Twilight color scheme:

Old

And here's the new one:

New

Build System

Lua.sublime-build

This is a simple build system that compiles and runs the current lua file. You can jump between errors using F4.

Live Parser

ParseLua.py

This is a small plugin that continually parses the current lua file and highlights any errors by placing a dot in the margin.

Syntax Error

Lua appears to stop at the first error, so you should only ever see one dot. The error message will be shown in the status bar.

Status Bar