From aff11eefce2861d4c3b07d3e5a24a7bfacbc9e1a Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 3 Jun 2022 20:16:14 +0200 Subject: [PATCH] More specific loop keyword high-lighting --- queries/highlights.scm | 7 +++++++ test/highlight/keywords.tig | 10 +++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/queries/highlights.scm b/queries/highlights.scm index 6cd4076..8fff33b 100644 --- a/queries/highlights.scm +++ b/queries/highlights.scm @@ -4,6 +4,13 @@ "primitive" ] @keyword.function +[ + "do" + "for" + "to" + "while" +] @keyword.repeat + [ "array" (break_expression) diff --git a/test/highlight/keywords.tig b/test/highlight/keywords.tig index 5ead351..70cb82c 100644 --- a/test/highlight/keywords.tig +++ b/test/highlight/keywords.tig @@ -28,13 +28,13 @@ in /* ^ keyword */ for i := 12 to 27 do 42; - /* <- keyword */ - /* ^ keyword */ - /* ^ keyword */ + /* <- keyword.repeat */ + /* ^ keyword.repeat */ + /* ^ keyword.repeat */ while 12 do break - /* <- keyword */ - /* ^ keyword */ + /* <- keyword.repeat */ + /* ^ keyword.repeat */ /* ^ keyword */ end