nvim-treesitter-cpp-tools icon indicating copy to clipboard operation
nvim-treesitter-cpp-tools copied to clipboard

Add support for methods in namespaces

Open Discusser opened this issue 8 months ago • 0 comments

When using TSCppDefineClassFunc on a method inside of a namespace, the function should be defined with the namespace. Example header file:

namespace A {
void b();
class C {
  void d();
  C e(C param);
};
}

Expected output when using TSCppDefineClassFunc:

void A::b() {}
void A::C::d() {}
A::C e(C param) {}

Currently, this just outputs the following (notice the lack of namespaces):

void b() {}
void C::d() {}
C C::e(C param) {}

Discusser avatar May 12 '25 18:05 Discusser