mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-08 19:43:11 +00:00
Update C++ Tree-sitter queries (#17471)
Closes #16443 Release Notes: - Fixed C++ functions being wrongly tagged as variables when called after two or more scope resolution operators. - Added a "namespace" tag for highlighting purposes Before : ![image](https://github.com/user-attachments/assets/743b8407-4e62-4549-9c6a-ed6608ea7e43) After : ![image](https://github.com/user-attachments/assets/de563621-e722-463c-97a1-a99b925f126e)
This commit is contained in:
parent
7c54965b11
commit
d5003e1121
1 changed files with 23 additions and 0 deletions
|
@ -1,10 +1,33 @@
|
||||||
(identifier) @variable
|
(identifier) @variable
|
||||||
(field_identifier) @property
|
(field_identifier) @property
|
||||||
|
(namespace_identifier) @namespace
|
||||||
|
|
||||||
(call_expression
|
(call_expression
|
||||||
function: (qualified_identifier
|
function: (qualified_identifier
|
||||||
name: (identifier) @function))
|
name: (identifier) @function))
|
||||||
|
|
||||||
|
(call_expression
|
||||||
|
(qualified_identifier
|
||||||
|
(identifier) @function.call))
|
||||||
|
|
||||||
|
(call_expression
|
||||||
|
(qualified_identifier
|
||||||
|
(qualified_identifier
|
||||||
|
(identifier) @function.call)))
|
||||||
|
|
||||||
|
(call_expression
|
||||||
|
(qualified_identifier
|
||||||
|
(qualified_identifier
|
||||||
|
(qualified_identifier
|
||||||
|
(identifier) @function.call))))
|
||||||
|
|
||||||
|
((qualified_identifier
|
||||||
|
(qualified_identifier
|
||||||
|
(qualified_identifier
|
||||||
|
(qualified_identifier
|
||||||
|
(identifier) @function.call)))) @_parent
|
||||||
|
(#has-ancestor? @_parent call_expression))
|
||||||
|
|
||||||
(call_expression
|
(call_expression
|
||||||
function: (identifier) @function)
|
function: (identifier) @function)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue