mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
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.
This commit is contained in:
parent
75797cdd8a
commit
14f4a70fd1
1 changed files with 6 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue