manateelazycat / lsp-bridge

A blazingly fast LSP client for Emacs
GNU General Public License v3.0
1.42k stars 205 forks source link

C++自己写的头文件函数名不显示,标准库可以 #936

Closed devbins closed 4 months ago

devbins commented 4 months ago

之前Rust函数名不显示的问题解决了,我又发现C++调用自己写的头文件中的函数,不显示函数名,标准库可以

Screenshot 2024-05-09 at 22 53 33

调用标准库函数

Screenshot 2024-05-09 at 22 53 21

test.h

#ifndef _TEST_H
#define _TEST_H

void init();

#endif /* _TEST_H */

main.cpp

#include <test.h>
#include <iostream>

int main(int argc, char *argv[])
{
  ini
    return 0;
}
manateelazycat commented 4 months ago

你把你的整个工程目录都上传一下吧, 我看看能否重现。

devbins commented 4 months ago

你把你的整个工程目录都上传一下吧, 我看看能否重现。

代码上传到 https://github.com/devbins/lsp-cpp 了,大佬有空试试

devbins commented 4 months ago

你把你的整个工程目录都上传一下吧, 我看看能否重现。

代码上传到 https://github.com/devbins/lsp-cpp 了,大佬有空试试

manateelazycat commented 4 months ago

只需要这两个文件吗? 不需要其他的 compile_commands.json 啥的吗?

devbins commented 4 months ago

只需要这两个文件吗? 不需要其他的 compile_commands.json 啥的吗?

不需要,有 compile_commands.json 也是一样的

manateelazycat commented 4 months ago

https://github.com/manateelazycat/lsp-bridge/commit/b8768c4a76525d82360d124c829774acd26634c3 修复了, 感谢反馈