From 5504b84d215e1f6a77ca27e68200840e2a3645f8 Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Sat, 5 Sep 2020 09:53:21 -0500 Subject: Lua: fix loop and conditional keywords highlights --- queries/lua/highlights.scm | 44 +++++++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 13 deletions(-) (limited to 'queries/lua') diff --git a/queries/lua/highlights.scm b/queries/lua/highlights.scm index 0ea6f635..9f7661a4 100644 --- a/queries/lua/highlights.scm +++ b/queries/lua/highlights.scm @@ -2,27 +2,45 @@ ;;; Builtins ;; Keywords -( - "if" @conditional - "end" @conditional -) + +(if_statement +[ + "if" + "then" + "end" +] @conditional) + [ "else" "elseif" - "then" -] @conditional +] @contional +(for_statement +[ + "for" + "do" + "end" +] @repeat) -( - [ +(for_in_statement +[ + "for" "do" + "end" +] @repeat) + +(while_statement +[ "while" - "repeat" - "for" - ] @repeat + "do" + "end" +] @repeat) - "end" @repeat -) +(repeat_statement +[ + "repeat" + "until" +] @repeat) [ "in" -- cgit v1.2.3