Attach kind of reference to query result instead of using subfields

This makes smart_rename work also for types out of the box and we don't
need to search for the path of actual node.
This commit is contained in:
Stephan Seitz 2020-07-18 19:25:06 +02:00 committed by Thomas Vigouroux
parent 45a1c3998d
commit 58c6d2a73f
3 changed files with 12 additions and 4 deletions

View file

@ -23,12 +23,17 @@
(alias_declaration
name: (type_identifier) @definition.type)
;template <typename T>
(type_parameter_declaration
(type_identifier) @definition.type)
;; Namespaces
(namespace_definition
name: (identifier) @definition.namespace
body: (_) @scope)
(namespace_identifier) @reference.namespace
((namespace_identifier) @reference
(set! reference.kind "namespace"))
;; Function defintions
(template_function