-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vscode intellsence智能提示问题,已尝试过所有能尝试的方法,还是无法解决 #229
Comments
这部分includes 是在 msvc 的 INCLUDE env 里面的,不在 -I 里面,目前没导出到 compile commands |
感谢大佬的回答,通过修改c_cpp_properties.json里的compilerPath指定为特定的msvc编译器路径后,显示正常了(还有在xmake里定义的宏在智能提示里并没有检测到),但是我希望xmake可以像cmake那样自动处理这些事情,我不知道cmake是怎么做到的,在vscode里他并没有生成c_cpp_properties.json等文件,也可以做到智能提示,祝xmake越来越好。最后问一下有没有可以完美支持xmake的编辑器 |
检查下生成的 compile_command.json 里面有没有这个宏 |
[](#229 (comment)) |
这个现在已经实现了,不过只针对了 clangd。。应该给 cpptools 也搞一个 |
Xmake 版本
v2.8.3
操作系统版本和架构
win11 x64
描述问题
vscode上使用xmake插件时使用c++20的format库,智能提示出错,找不到format。
compile_commands.json,c_cpp_properties.json,settings.json均已配置。
xmake.lua里也设置了c++20。
编译器:VS2022附带的MSVC,ubuntu下的gcc-11(链接的fmt)的c++,intellsence均无法找到头文件,但是都可以正常编译
期待的结果
希望vscode xmake intellsence智能提示问题可以解决
工程配置
xmake.lua
尝试过set_languages("c++20")也不行
main.cpp
compile_commands.json
c_cpp_properties.json
settings.json
附加信息和错误日志
emmm...
The text was updated successfully, but these errors were encountered: