mirror of
https://github.com/chenasraf/nvim-treesitter.git
synced 2026-05-17 17:38:02 +00:00
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`.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user