From 03f650705c0c10f97b214ca4ecca3c25ff9bee7d Mon Sep 17 00:00:00 2001 From: Noah Date: Tue, 19 Mar 2024 17:10:41 -0400 Subject: Update Clojure highlights to be metadata aware (#6213) --- tests/query/highlights/clojure/test.clj | 70 +++++++++++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/query/highlights/clojure/test.clj b/tests/query/highlights/clojure/test.clj index 5c9ca649b..7401019e8 100644 --- a/tests/query/highlights/clojure/test.clj +++ b/tests/query/highlights/clojure/test.clj @@ -13,10 +13,14 @@ ;^^^^ @function.call ; ^^^ @variable - #(+ % %1 %&) + #(+ % %1 %& %a) ;^ @punctuation.special ; ^ @function.call ; ^ ^^ ^^ @variable.builtin +; ^^ @variable + + abc# +;^^^^ @variable & ;^ @variable.parameter @@ -30,13 +34,16 @@ *1 *2 *3 *e ;^^ ^^ ^^ ^^ @variable.builtin -(.method) + .method +;^^^^^^^ @function.method + +(.method foo) ;^^^^^^^ @function.method -(.-field) +(.-field foo) ;^^^^^^^ @variable.member - Abc/method + Abc/member ;^^^^^^^^^^ @variable.member (Abc/method) @@ -50,3 +57,58 @@ ^abc ;^ @punctuation.special + +^java.io.File file +; <- @punctuation.special +;^^^^^^^^^^^^ @type +; ^^^^ @variable + +^java.io.File java.io.File. +; <- @punctuation.special +;^^^^^^^^^^^^ @type +; ^^^^ @variable + +^java.io.File file. +; <- @punctuation.special +;^^^^^^^^^^^^ @type +; ^^^^ @variable + +(^java.io.File file) +;^ @punctuation.special +; ^^^^^^^^^^^^ @type +; ^^^^ @function.call + +(^java.io.File .file foo) +;^ @punctuation.special +; ^^^^^^^^^^^^ @type +; ^^^^ @function.method +; ^^^@variable + +(^java.io.File .-file foo) +;^ @punctuation.special +; ^^^^^^^^^^^^ @type +; ^^^^ @variable.member +; ^^^@variable + +(^java.io.File Abc/method foo) +;^ @punctuation.special +; ^^^^^^^^^^^^ @type +; ^^^^^^^^^^ @function.method +; ^^^ @variable + + (defn foo [arg1] (+ arg1 1)) +;^ ^ ^ ^ ^^ @punctuation.bracket +; ^^^^ @keyword.function +; ^^^ @function +; ^^^^ ^^^^ @variable +; ^ @operator +; ^ @number + + clojure.core/dfn +;^^^^^^^^^^^^^^^^ @variable + + clojure.core/defn +;^^^^^^^^^^^^^^^^ @keyword.function + + any-ns/defn +;^^^^^^^^^^^ @keyword.function -- cgit v1.2.3-70-g09d2