From c67328ab2e0d572718575e02ae07db37552e1cbe Mon Sep 17 00:00:00 2001 From: Cole McAnelly <76577549+colemcanelly@users.noreply.github.com> Date: Wed, 14 Jan 2026 10:52:39 -0600 Subject: [PATCH] languages: Separate control flow keywords for Shell Scripts (#46722) Part of https://github.com/zed-industries/zed/issues/9461. Similar PRs: - https://github.com/zed-industries/zed/pull/39683 - https://github.com/zed-industries/zed/pull/39801 ## Release Notes: - Added the ability to separately highlight control flow keywords for Shell Scripts for users and theme authors via the `keyword.control` syntax property. ## Screenshots | **Before** | **After** | |:--:|:--:| | image | image | --- crates/languages/src/bash/highlights.scm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/crates/languages/src/bash/highlights.scm b/crates/languages/src/bash/highlights.scm index 7da0de793ad03370131557c97fa9c8c442aae797..a9d7b24060a3c8070d699166d27ac91580ca2379 100644 --- a/crates/languages/src/bash/highlights.scm +++ b/crates/languages/src/bash/highlights.scm @@ -10,6 +10,14 @@ (variable_name) @variable +[ + "export" + "function" + "unset" + "local" + "declare" +] @keyword + [ "case" "do" @@ -17,20 +25,15 @@ "elif" "else" "esac" - "export" "fi" "for" - "function" "if" "in" "select" "then" - "unset" "until" "while" - "local" - "declare" -] @keyword +] @keyword.control (comment) @comment