kakoune/rc
Hugo Musso Gualandi aa1a280309 lua.kak: more accurate "end" insertion
- Also insert "end" after "do", "else" and "elseif"
- Do not insert "end" after strings or comments containing keywords
- Only insert "end" if the block is empty

An example of the last item is if we want to add a new line to the start
of an unclosed block that already contains statements. @ is the cursor.

    -- before
    if a then@
        x = 1
        y = 2

    -- after
    if a then
        @
    end
        x = 1
        y = 2

In this case, inserting the "end" before the statements is probably not
what the programmer wants. It might make more sense to insert the "end"
after the statements, but that is potentially confusing due to spooky
action at a distance. I think the least confusing thing to do in this
situation is to not insert the "end".
2021-09-11 01:29:01 -03:00
..
detection Stop editorconfig.kak from setting aligntab 2021-08-29 11:55:33 -07:00
filetype lua.kak: more accurate "end" insertion 2021-09-11 01:29:01 -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