home/rc
Hugo Musso Gualandi 8755fc679e lua.kak: improve the indentation logic
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"
2021-09-11 01:27:41 -03:00
..
detection Stop editorconfig.kak from setting aligntab 2021-08-29 11:55:33 -07:00
filetype lua.kak: improve the indentation logic 2021-09-11 01:27:41 -03:00
tools Merge remote-tracking branch 'gustavo-hms/master' 2021-08-17 08:43:25 +10:00
windowing Merge remote-tracking branch 'StatPal/master' into HEAD 2021-08-28 13:55:11 +10:00