8755fc679e
This commit makes several improvements to the Lua indentation logic. - Don't indent if the keyword is inside a string or comment - Indent inside "do end" - Indent inside "repeat until" - Indent after a line ending with "{" or "(" - More accurate un-indentation for the "end" keyword For the last point, previously we tried to match the indentation of the starting keyword of the block. However, sometimes this guessed wrong and produced the wrong indentation, as the following example shows. The new logic is to indent the "end" by one less level than the contents of the block. while true do if false then end end -- This was incorrectly matched with the "if" |
||
---|---|---|
.. | ||
detection | ||
filetype | ||
tools | ||
windowing |