Subject: Re: bug#66159: 30.0.50; lua-ts-mode semantic indentation problems

From: Andrey Listopadov <[email-masked]>
Date: Sun, 24 Sep 2023 19:38:38 +0300

Thanks! The patch seems to work as I would expect for most cases.

> I don't see any reason not to support that style but I'm not sure how to
> do it. A patch would be welcome but I'll try to figure it out sometime.

A far as I understand it, in the `lua-mode' the overall line indentation
is computed via subtracting indentation for every `end' in that line,
e.g. `end end end' subtracts `lua-indent-level three times from current
indent level.

> Sure. It's a new mode so nothing is really set in stone. Let me know if
> you have other suggestions.

I also noticed that `lua-ts-inferior-lua` for some reason starts itself
in a new frame instead of just a new window. I haven't seen this
behavior with other inferior-*-modes, and the `lua-start-process'
function from `lua-mode' doesn't spawn a new frame either.

Looking at the code, it seems that it was a deliberate choice, as I see
the use of `display-buffer-pop-up-frame' in the `display-buffer' ACTION
arg.

--
Andrey Listopadov