diff options
| author | Stephan Seitz <stephan.seitz@fau.de> | 2020-07-18 19:25:06 +0200 |
|---|---|---|
| committer | Thomas Vigouroux <39092278+vigoux@users.noreply.github.com> | 2020-07-20 08:55:53 +0200 |
| commit | 58c6d2a73fa40e2ad2e6f41215737d6ff27c4bf9 (patch) | |
| tree | 08457d3911ea77ba4cc70694a54416d17ba33a0f /queries/cpp | |
| parent | 45a1c3998d93d743440751fcd65603517d5780ac (diff) | |
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.
Diffstat (limited to 'queries/cpp')
| -rw-r--r-- | queries/cpp/locals.scm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/queries/cpp/locals.scm b/queries/cpp/locals.scm index b85e5f9e..69d2f2c2 100644 --- a/queries/cpp/locals.scm +++ b/queries/cpp/locals.scm @@ -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 |
