Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

languages: Add shebang highlight support for Bash (#48064)

ozacod81d01ef853eb
diff --git a/crates/languages/src/bash/highlights.scm b/crates/languages/src/bash/highlights.scm
index a9d7b24060a..2852e5ff9a3 100644
--- a/crates/languages/src/bash/highlights.scm
+++ b/crates/languages/src/bash/highlights.scm
@@ -37,6 +37,12 @@
(comment) @comment
+; Shebang
+((program
+ .
+ (comment) @keyword.directive)
+ (#match? @keyword.directive "^#![ \t]*/"))
+
(function_definition name: (word) @function)
(command_name (word) @function)