summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSantos Gallegos <stsewd@protonmail.com>2020-09-05 09:53:21 -0500
committerThomas Vigouroux <tomvig38@gmail.com>2020-09-06 17:24:34 +0200
commit5504b84d215e1f6a77ca27e68200840e2a3645f8 (patch)
treea12a7220f4e467a4d5a098edbf1ef97e52e9ca9c
parent02735aae5508a9f85703bbf142eb0d1174470402 (diff)
Lua: fix loop and conditional keywords highlights
-rw-r--r--queries/lua/highlights.scm44
1 files changed, 31 insertions, 13 deletions
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"