How to jump to var
and struct
definitions using clangd
via gd/gD
in project?
#836
-
在一个项目内部,很多变量结构体都提示unknown type,或者gD 跳转不过去,请问是需要配置什么东西吗 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
Can u help fill in the issue form? This discussion provides too little information, and we can't infer the problem from a simple description. Instead, we need a specific environment (e.g., which server?), steps to reproduce this issue, and relevant logs to know exactly what the problem is. Such a bald description is not helpful at all. |
Beta Was this translation helpful? Give feedback.
-
branch 0.8,您的这个例子是在同一个文件,我又做了一个简单的测试如temp.cpp 和 temp.h,.h文件定义了struct A,在cpp文件中 gd 确实是可以找到的。 感谢提醒字体,这个应该不会影响我的跳转,我之后会下载,现在刚开始使用vim,有许多快捷键不清楚如何使用。 |
Beta Was this translation helpful? Give feedback.
ys. This is the only way
clangd
can understand complex code trees. VSCode doesn't require such configuration b/c it has already generated this file for you (usually viarizsotto/bear
).Make sure to read
clangd
's documentation before u start :)