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
  • 5 years ago
  • 2 hours ago
  • 7 years ago

Installs

  • Total 23K
  • Win 14K
  • OS X 6K
  • Linux 3K
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 Aug 4
Windows 7 4 2 4 4 1 7 2 0 3 0 1 1 4 3 5 1 1 2 3 0 5 3 4 2 3 3 2 2 3 4 1 1 8 3 4 4 5 3 4 1 6 1 2 2 2
OS X 1 0 1 0 2 0 1 1 1 0 0 0 0 3 0 1 0 0 0 3 1 1 3 0 1 0 1 1 1 1 1 0 0 1 1 1 0 1 0 1 1 1 1 0 0 0
Linux 0 0 1 1 1 1 1 0 0 0 0 0 0 0 3 0 0 0 1 1 1 0 0 1 0 1 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:

And here's the new one:

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.

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.