Sublime Forum

Help with Lua Indent

#1

I noticed that the auto-indent doesn’t seem to work with LUA in some cases:

As you can see, the content of the table brackets is not indented, and the closing bracket is one level too far to the left.

The same snippet in Javascript indents correctly:

Is there an easy way to get the indentation to work correctly here? I would expect the behavior to be identical to what happens in the javascript example above. Yes, It’s minor issue but it bothers me when the indentation behaves differently like this than what I’m used to (I generally work with javascript and php)

The settings variables auto_indent and smart_indent are both set to default (true). Syntax in the above examples are set to LUA and Javascript respectively.

0 Likes

#2

I’m also experiencing this issue on stable build 3143
Fixing this simply requires editing the IncreaseIndentPattern for lua. Can we get this fix applied by default in the next version?

0 Likes

#3

yes, just make a PR at

:slight_smile:

0 Likes