vscode-code-outline
vscode-code-outline copied to clipboard
[C++] Symbols not shown for class implementations
Hi,
First of all, thank you for providing this plugin! It really fills a gap.
There is an issue with C++ code. Consider the below minimal working example:
// Header file: myfile.h
#ifndef __myfile__
#define __myfile__
class Example {
public:
void sayHello();
};
#endif
And the implementation
// File myotherfile.cc
#include "myfile.h"
#include <iostream>
void Example::sayHello() {
std::cout << "Hello" << std::endl;
}
int main() {
Example ex;
ex.sayHello();
return 0;
}
Code Outline will correctly detect the symbols for the class "Example" and its method "sayHello()" when editing "myfile.h" but will only find "main()" in "myotherfile.cc".
It would be handy to have Example::sayHello() in the tree for "myotherfile.cc", VS Code's symbol navigator (Ctrl+Shift+O) correctly detects them.
Many thanks!
fwiw, this is probably fixed by https://github.com/patrys/vscode-code-outline/pull/27 (at least, it works using cquery for C++ after that PR)
@mbahri Can we close this now?