[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#66159: [PATCH] Various improvements to lua-ts-mode (Bug#66159)
From: |
john muhl |
Subject: |
bug#66159: [PATCH] Various improvements to lua-ts-mode (Bug#66159) |
Date: |
Sun, 08 Oct 2023 22:28:02 -0500 |
Mauro Aranda <maurooaranda@gmail.com> writes:
> On 6/10/23 16:44, john muhl via Bug reports for GNU Emacs, the Swiss
> army knife of text editors wrote:
>
>> +(defcustom lua-ts-inferior-history nil
>> + "File used to save command history of the inferior Lua process."
>> + :type '(choice (const nil) file)
>
> Please, give a :tag for the const option. IMO, it makes for a better
> Customize UI.
Fixed here and for the other choices.
Andrey Listopadov <andreyorst@gmail.com> writes:
> john muhl <jm@pub.pink> writes:
>
>>> It seems the last patch broke the movement.
>>
>> The tests for those pass and are still working here. Maybe you found
>> another case that needs to be improved. What is the specific problem?
>
> It seems so, sorry for not including this, I thought I sent this before.
> Here's an example:
>
>
> █for i=1,10 do
> print(x)
> end
>
> Pressing Pressing C-M-f (forward-sexp) puts the point here:
>
> for i=1,10 do
> print(x)█
> end
>
> I think it should go over the `for' loop right to the `end'.
>
> Pressing Pressing C-M-b (backward-sexp), however, puts the point here:
>
> for i=1,10 do
> █print(x)
> end
>
> Pressing C-M-b again doesn't move the point anymore.
>
> Same thing happens with for-each style loop:
>
> █for k,v in pairs({1,2,3}) do
> print(x)
> end
>
> C-M-f:
>
> for k,v in pairs({1,2,3})█do
> print(x)
> end
>
> C-M-f:
>
> for k,v in pairs({1,2,3}) do
> print(x)█
> end
>
> Backward movement manages to take the point way back to the pairs:
>
> C-M-b, C-M-b:
>
> for k,v in pairs█({1,2,3}) do
> print(x)
> end
>
> I went to https://devhints.io/lua and copied a bunch of examples of
> other loops to the scratch buffer, and the movement is as follows:
>
> █while condition do
> end
>
> for i = 1,5 do
> end
>
> for i = start,finish,delta do
> end
>
> for k,v in pairs(tab) do
> end
>
> repeat
> until condition
>
> -- Breaking out:
> while x do
> if condition then break end
> end
>
> C-M-f:
>
> while condition do
> end
>
> for i = 1,5 do
> end
>
> for i = start,finish,delta do
> end
>
> for k,v in pairs(tab)█do
> end
>
> repeat
> until condition
>
> -- Breaking out:
> while x do
> if condition then break end
> end
>
> C-M-f:
>
> while condition do
> end
>
> for i = 1,5 do
> end
>
> for i = start,finish,delta do
> end
>
> for k,v in pairs(tab) do
> end
>
> repeat
> until condition
>
> -- Breaking out:
> while x do
> if condition then break end█
> end
Navigation should be all around improved now. Let me know if I missed something.
0001-Various-improvements-to-lua-ts-mode-Bug-66159.patch
Description: Text Data
- bug#66159: [PATCH] Various improvements to lua-ts-mode (Bug#66159), john muhl, 2023/10/06
- bug#66159: [PATCH] Various improvements to lua-ts-mode (Bug#66159), Mauro Aranda, 2023/10/07
- bug#66159: [PATCH] Various improvements to lua-ts-mode (Bug#66159), Andrey Listopadov, 2023/10/07
- bug#66159: [PATCH] Various improvements to lua-ts-mode (Bug#66159), john muhl, 2023/10/07
- bug#66159: [PATCH] Various improvements to lua-ts-mode (Bug#66159), Andrey Listopadov, 2023/10/08
- bug#66159: [PATCH] Various improvements to lua-ts-mode (Bug#66159),
john muhl <=
- bug#66159: [PATCH] Various improvements to lua-ts-mode (Bug#66159), john muhl, 2023/10/17
- bug#66159: [PATCH] Various improvements to lua-ts-mode (Bug#66159), Stefan Kangas, 2023/10/20
- bug#66159: [PATCH] Various improvements to lua-ts-mode (Bug#66159), john muhl, 2023/10/23
- bug#66159: [PATCH] Various improvements to lua-ts-mode (Bug#66159), Stefan Kangas, 2023/10/23
- bug#66159: [PATCH] Various improvements to lua-ts-mode (Bug#66159), Andrey, 2023/10/21
- bug#66159: [PATCH] Various improvements to lua-ts-mode (Bug#66159), Andrey, 2023/10/21