From b218d8778da1fac7ef75af85afb336f7ed36621b Mon Sep 17 00:00:00 2001 From: Jayden Seric Date: Mon, 3 Jun 2024 08:52:16 +1000 Subject: [PATCH] Fix TSX and JavaScript shorthand property syntax highlighting (#12512) This replicates the fix for the TypeScript language for https://github.com/zed-industries/zed/issues/5239 in https://github.com/zed-industries/zed/pull/12505 for the TSX and JavaScript languages, fixing https://github.com/zed-industries/zed/issues/12510 and fixing https://github.com/zed-industries/zed/issues/12509 . See https://github.com/zed-industries/zed/pull/12505#issuecomment-2141002505 . Keep in mind I don't have a proper Zed local development environment setup to test these simple changes. Release Notes: - Fixed TSX shorthand property syntax highlighting ([#12510](https://github.com/zed-industries/zed/issues/12510)). - Fixed JavaScript shorthand property syntax highlighting ([#12509](https://github.com/zed-industries/zed/issues/12509)). --- crates/languages/src/javascript/highlights.scm | 2 ++ crates/languages/src/tsx/highlights.scm | 2 ++ 2 files changed, 4 insertions(+) diff --git a/crates/languages/src/javascript/highlights.scm b/crates/languages/src/javascript/highlights.scm index d4c192d47adc40369a63795a4c95a55a1e1aa4b7..a89375dee2a1872d21f03c169bf54f3d174aab94 100644 --- a/crates/languages/src/javascript/highlights.scm +++ b/crates/languages/src/javascript/highlights.scm @@ -5,6 +5,8 @@ ; Properties (property_identifier) @property +(shorthand_property_identifier) @property +(shorthand_property_identifier_pattern) @property ; Function and method calls diff --git a/crates/languages/src/tsx/highlights.scm b/crates/languages/src/tsx/highlights.scm index fb74c926825439c934c15c7a00533f1aa9758dc8..2ebbd62f668d3d40b4ab232c96eb0697d87d5ab1 100644 --- a/crates/languages/src/tsx/highlights.scm +++ b/crates/languages/src/tsx/highlights.scm @@ -5,6 +5,8 @@ ; Properties (property_identifier) @property +(shorthand_property_identifier) @property +(shorthand_property_identifier_pattern) @property ; Function and method calls