From 0708d476cae398cf88ef9680fd8c5b7054696887 Mon Sep 17 00:00:00 2001 From: chbk Date: Sun, 6 Apr 2025 17:14:05 +0200 Subject: [PATCH] Improve Bash heredoc highlighting (#28185) Release Notes: - Improved Bash heredoc highlighting | Zed 0.180.2 | With this PR | | --- | --- | | ![Image](https://github.com/user-attachments/assets/aa2534af-53df-4f01-988e-f18ec52a2b62) | ![Image](https://github.com/user-attachments/assets/8fc92113-41f2-4249-ab81-6beb0a1469ca) | ```bash cat << EOT >> hello.txt hello world EOT ``` - `<<`: `operator` - `EOT`: `string` --- crates/languages/src/bash/highlights.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/languages/src/bash/highlights.scm b/crates/languages/src/bash/highlights.scm index a8ae81058a1a33d9e42f18858c157f2f95ded71a..7da0de793ad03370131557c97fa9c8c442aae797 100644 --- a/crates/languages/src/bash/highlights.scm +++ b/crates/languages/src/bash/highlights.scm @@ -3,6 +3,7 @@ (raw_string) (heredoc_body) (heredoc_start) + (heredoc_end) (ansi_c_string) (word) ] @string @@ -54,6 +55,7 @@ "$" "&&" ">" + "<<" ">>" ">&" ">&-"