mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04: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:
parent
a98a740c55
commit
02693ce64c
1 changed files with 6 additions and 2 deletions
|
|
@ -13,8 +13,12 @@
|
||||||
(keyword_object_id)
|
(keyword_object_id)
|
||||||
] @function.call
|
] @function.call
|
||||||
|
|
||||||
(object_reference
|
((object_reference
|
||||||
name: (identifier) @type)
|
name: (identifier) @type) @_obj_ref
|
||||||
|
(#not-has-parent? @_obj_ref invocation))
|
||||||
|
|
||||||
|
(cte
|
||||||
|
(identifier) @type)
|
||||||
|
|
||||||
(relation
|
(relation
|
||||||
alias: (identifier) @variable)
|
alias: (identifier) @variable)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue