summaryrefslogtreecommitdiff
path: root/src/input_handler.cc
diff options
context:
space:
mode:
authorHugo Musso Gualandi <hugo_musso_gualandi@hotmail.com>2021-09-10 01:43:59 -0300
committerHugo Musso Gualandi <hugo_musso_gualandi@hotmail.com>2021-09-11 01:27:41 -0300
commit8755fc679e265727ed5cb858c156dfdba51ae718 (patch)
treeebcac9b2b1c44d1c3cba78d183c8359183bf46f1 /src/input_handler.cc
parentffc69544db0c883ff1992d7f2825233e6bc7e472 (diff)
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"
Diffstat (limited to 'src/input_handler.cc')
0 files changed, 0 insertions, 0 deletions