I have an issue to use the "find declaration" tool.
Find the declaration of a symbol in a header file, but the header file is not belong to the cbp project.
I have a project, say, it has a file named a.cpp. In this file, I have some definition like
And the TypeA is defined in a header file (e.g. TypeA.h), which is not belong to the cbp project, say, it could be in a include search path.
Now, when I use the "find declaration of TypeA", I see LSP can correctly jump to the TypeA.h.
Now, say the TypeA is actually a typedef, such as:
Now, when I right click on the TypeB symbol, and "find declaration of TypeB", I see the clangd_client plugin will jump a messagebox, it said:
[Window Title]
LSP OnGotoDeclaration
[Content]
The editor's file does not have an associated project.
Perhaps add the file to a project ?
[OK]
This looks wrong, I mean if the a.cpp get parsed by clangd, it should understand where TypeB is declared. So, is this a bug? I think adding the TypeA.h to my cbp project is not the correct way to solve this issue.
Any ideas?
Thanks.