From 954336fe5c9c0f42399f11f4610c5f8b3545d089 Mon Sep 17 00:00:00 2001 From: BlockLune <39331194+BlockLune@users.noreply.github.com> Date: Thu, 21 Aug 2025 00:47:30 +0800 Subject: [PATCH] feat(wxml): rewrite with `#lua-match?` --- runtime/queries/wxml/highlights.scm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/runtime/queries/wxml/highlights.scm b/runtime/queries/wxml/highlights.scm index d71a0f4fc..a6c72d33c 100644 --- a/runtime/queries/wxml/highlights.scm +++ b/runtime/queries/wxml/highlights.scm @@ -28,10 +28,19 @@ (#any-of? @keyword.repeat "wx:for" "wx:for-index" "wx:for-item")) ((attribute_name) @keyword - (#match? @keyword "^(bind|catch|mut-bind):?")) + (#lua-match? @keyword "^bind")) ((attribute_name) @keyword - (#match? @keyword "^(model:|data-)")) + (#lua-match? @keyword "^catch")) + +((attribute_name) @keyword + (#lua-match? @keyword "^mut-bind")) + +((attribute_name) @keyword + (#lua-match? @keyword "^model:")) + +((attribute_name) @keyword + (#lua-match? @keyword "^data-")) ((attribute (attribute_name) @_attr