From 2306e3cd504c3da6c49695e5559db12f514f6734 Mon Sep 17 00:00:00 2001 From: adorabilis Date: Fri, 3 May 2024 17:37:44 +0800 Subject: [PATCH] Add brackets and missing operators to Python grammar (#11180) Release Notes: - Fixed #4341 Before: ![before](https://github.com/zed-industries/zed/assets/16101408/34672e47-5131-481a-803e-064db8126cc9) After: ![after](https://github.com/zed-industries/zed/assets/16101408/7d2405c6-d04f-4738-ad2e-a9424b1c9d19) --- crates/languages/src/python/highlights.scm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/crates/languages/src/python/highlights.scm b/crates/languages/src/python/highlights.scm index 0d85c8b6a9354a00ee8574ad5e76b659e22639cd..386e2e274f43e20cd1d4be788ec6e0af6a5dedcd 100644 --- a/crates/languages/src/python/highlights.scm +++ b/crates/languages/src/python/highlights.scm @@ -48,6 +48,15 @@ (string) @string (escape_sequence) @escape +[ + "(" + ")" + "[" + "]" + "{" + "}" +] @punctuation.bracket + (interpolation "{" @punctuation.special "}" @punctuation.special) @embedded @@ -96,6 +105,8 @@ "is" "not" "or" + "is not" + "not in" ] @operator [