LuaExtended
An improved ST3 Lua syntax definition.
Details
Installs
- Total 9K
- Win 6K
- Mac 2K
- Linux 1K
Jul 27 | Jul 26 | Jul 25 | Jul 24 | Jul 23 | Jul 22 | Jul 21 | Jul 20 | Jul 19 | Jul 18 | Jul 17 | Jul 16 | Jul 15 | 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 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 1 | 2 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 2 | 2 | 0 | 1 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 2 | 1 | 2 | 4 | 2 | 3 | 3 | 0 | 2 | 0 | 1 | 0 | 2 | 1 |
Mac | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
What is this?
LuaExtended is a syntax definition and snippet package for Sublime Text 3.
Features
As of right now, LuaExtended contains the following improvements over the default Lua package:
Indentation of
repeat until
loops fixedIndentation of table definitions fixed
Improved syntax definition structure for easier future work on more fixes
error
calls have red-highlighted stringsCompletions include the full standard library, including parameter names with tab stops
Completions also include Lua keywords
New snippets:
New loop snippets (
while
andrepeat
)Improved indentation of
for
snippets, synced variable name tab stops++
(expands the current line into the form ofline = line + 1
, ignoring inline comments and whitespace)+=
and-=
dfun
, an LDoc-style documented function snippetif
,elseif
andelse
if~
,if=
, and theirelseif
counterparts, expanding toif x ~= y then ...
and similarMost snippets also handle selection, meaning you can e.g. apply
while
on a block of code which will then become the body of thewhile
loop
Function calls (including object method invocations
foo:bar()
and syntactic sugar likefoo { bar }
) are highlighted properlyAnonymous function definitions are highlighted properly (arguments are formatted)
Restructured indent settings
do end
blocks are indented properly
All features are grouped under the
source.luae
scope, so that they don't interfere with the default Lua package
Installation
You can now use Package Control to install LuaExtended. Simply type “install” in the Command Palette (Ctrl + Shift + P) to find the Package Control: Install Package
command. Wait for the repository lists to load
and search for 'LuaExtended'. Alternatively, you can clone this repository into your Data/User
folder (either in the install directory, in %appdata%/Sublime Text 3
on Windoze, or wherever else other environments put it).
LuaExtended and Linters
If you are using a SublimeLinter3-based linter such as SublimeLinter-lua, you will need to modify your settings to get LuaExtended linting to work.
Navigate to Preferences > Package Settings
Find SublimeLinter in the list and open its “Settings - User”
The settings file is of the JSON format, so look for the line that says "syntax_map": {
You will need to add a binding that tells SublimeLinter to lint LuaExtended just like Lua. This is done by adding a line that says "luaextended": "lua",
. Don't worry about the alphabetical order of the entries, SublimeLinter will sort them on next reload.
And there you go! Try opening a *.luae
, *.ext.lua
or *.extended.lua
file and see whether linting works. If it for some reason doesn't work, read the tutorial again and check that you've followed it to the point. Try restarting Sublime before opening an issue!