From 14f4a70fd1c1a7aa76288c821038de30d9b58813 Mon Sep 17 00:00:00 2001 From: Anton Daitche Date: Thu, 4 Dec 2025 11:16:47 +0100 Subject: [PATCH] In sql/highlights.scm improve @type capture @type currently captures function calls, resulting in the wrong color assigned to them (the one of @type instead of @function.call). Also @type doesn't capture CTE names. But to be consistent with the behavior that @type refers to tables it arguably should capture CTEs. --- runtime/queries/sql/highlights.scm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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)