From 02693ce64c87e43eaa0e11e907116b2190217d07 Mon Sep 17 00:00:00 2001 From: adaitche Date: Tue, 9 Dec 2025 10:53:37 +0100 Subject: feat(sql): improve `@type` capture (#8315) Problem: `@type` currently captures function calls but fails to capture CTE names. Solution: Don't capture types in invocations. Add pattern for `cte`. --- runtime/queries/sql/highlights.scm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'runtime/queries') diff --git a/runtime/queries/sql/highlights.scm b/runtime/queries/sql/highlights.scm index b3a0c71c6..7a201a026 100644 --- a/runtime/queries/sql/highlights.scm +++ b/runtime/queries/sql/highlights.scm @@ -13,8 +13,12 @@ (keyword_object_id) ] @function.call -(object_reference - name: (identifier) @type) +((object_reference + name: (identifier) @type) @_obj_ref + (#not-has-parent? @_obj_ref invocation)) + +(cte + (identifier) @type) (relation alias: (identifier) @variable) -- cgit v1.2.3-70-g09d2