mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 03:40:04 -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)
|
(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