; Cleanup sexp things in 'lua-ts-mode'
* lisp/progmodes/lua-ts-mode.el (lua-ts-mode): Remove some nonsensical entries from 'treesit-thing-settings'. * test/lisp/progmodes/lua-ts-mode-resources/movement.erts: Add missing tests for 'backward-sexp'. (Bug#76534)
This commit is contained in:
parent
b531bbf73e
commit
3998dea566
2 changed files with 56 additions and 15 deletions
|
@ -798,8 +798,7 @@ Calls REPORT-FN directly."
|
||||||
`((lua
|
`((lua
|
||||||
(function ,(rx (or "function_declaration"
|
(function ,(rx (or "function_declaration"
|
||||||
"function_definition")))
|
"function_definition")))
|
||||||
(keyword ,(regexp-opt lua-ts--keywords
|
(keyword ,(regexp-opt lua-ts--keywords 'symbols))
|
||||||
'symbols))
|
|
||||||
(loop-statement ,(rx (or "do_statement"
|
(loop-statement ,(rx (or "do_statement"
|
||||||
"for_statement"
|
"for_statement"
|
||||||
"repeat_statement"
|
"repeat_statement"
|
||||||
|
@ -817,18 +816,10 @@ Calls REPORT-FN directly."
|
||||||
keyword
|
keyword
|
||||||
loop-statement
|
loop-statement
|
||||||
,(rx (or "arguments"
|
,(rx (or "arguments"
|
||||||
"break_statement"
|
|
||||||
"expression_list"
|
|
||||||
"false"
|
|
||||||
"identifier"
|
|
||||||
"nil"
|
|
||||||
"number"
|
|
||||||
"parameters"
|
"parameters"
|
||||||
"parenthesized_expression"
|
"parenthesized_expression"
|
||||||
"string"
|
"string"
|
||||||
"table_constructor"
|
"table_constructor"))))
|
||||||
"true"
|
|
||||||
"vararg_expression"))))
|
|
||||||
(text "comment"))))
|
(text "comment"))))
|
||||||
|
|
||||||
;; Imenu/Outline/Which-function.
|
;; Imenu/Outline/Which-function.
|
||||||
|
|
|
@ -436,9 +436,9 @@ function f(a, b)| end
|
||||||
Name: forward-sexp moves over strings
|
Name: forward-sexp moves over strings
|
||||||
|
|
||||||
=-=
|
=-=
|
||||||
print("|1, 2, 3")
|
print(|"1, 2, 3")
|
||||||
=-=
|
=-=
|
||||||
print("1, 2, 3|")
|
print("1, 2, 3"|)
|
||||||
=-=-=
|
=-=-=
|
||||||
|
|
||||||
Name: forward-sexp moves over tables
|
Name: forward-sexp moves over tables
|
||||||
|
@ -557,9 +557,9 @@ function f|(a, b) end
|
||||||
Name: backward-sexp moves over strings
|
Name: backward-sexp moves over strings
|
||||||
|
|
||||||
=-=
|
=-=
|
||||||
print("1, 2, 3|")
|
print("1, 2, 3"|)
|
||||||
=-=
|
=-=
|
||||||
print("|1, 2, 3")
|
print(|"1, 2, 3")
|
||||||
=-=-=
|
=-=-=
|
||||||
|
|
||||||
Name: backward-sexp moves over tables
|
Name: backward-sexp moves over tables
|
||||||
|
@ -601,3 +601,53 @@ end|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
=-=-=
|
=-=-=
|
||||||
|
|
||||||
|
Name: backward-sexp moves over do statements
|
||||||
|
|
||||||
|
=-=
|
||||||
|
do
|
||||||
|
print(a + 1)
|
||||||
|
end|
|
||||||
|
=-=
|
||||||
|
|do
|
||||||
|
print(a + 1)
|
||||||
|
end
|
||||||
|
=-=-=
|
||||||
|
|
||||||
|
Name: backward-sexp moves over for statements
|
||||||
|
|
||||||
|
=-=
|
||||||
|
for k,v in pairs({}) do
|
||||||
|
print(k, v)
|
||||||
|
end|
|
||||||
|
=-=
|
||||||
|
|for k,v in pairs({}) do
|
||||||
|
print(k, v)
|
||||||
|
end
|
||||||
|
=-=-=
|
||||||
|
|
||||||
|
Name: backward-sexp moves over repeat statements
|
||||||
|
|
||||||
|
=-=
|
||||||
|
repeat
|
||||||
|
n = n + 1
|
||||||
|
until n > 10|
|
||||||
|
=-=
|
||||||
|
|repeat
|
||||||
|
n = n + 1
|
||||||
|
until n > 10
|
||||||
|
=-=-=
|
||||||
|
|
||||||
|
Name: backward-sexp moves over while statements
|
||||||
|
|
||||||
|
=-=
|
||||||
|
while n < 99
|
||||||
|
do
|
||||||
|
n = n+1
|
||||||
|
end|
|
||||||
|
=-=
|
||||||
|
|while n < 99
|
||||||
|
do
|
||||||
|
n = n+1
|
||||||
|
end
|
||||||
|
=-=-=
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue