xmake-io / xmake-vscode

🍩 A XMake integration in Visual Studio Code
https://xmake.io
Apache License 2.0
223 stars 55 forks source link

Set path to compileCommands automatically. #247

Open Symbitic opened 6 months ago

Symbitic commented 6 months ago

I'm not sure if this is a feature or a bug fix, but this removes the need for setting the path to the compile commands file in .vscode/c_cpp_properties.json by setting C_Cpp.default.compileCommands.

With this, IntelliSense should work as soon as XMake is run for the first time.

waruqi commented 6 months ago

If the user does not have cpptools installed and is only using clangd. Does it work? https://xmake.io/#/plugin/more_plugins?id=clangd

123485k commented 6 months ago

可以参考下cmake插件的实现vscode-cmake-tools/src/cpptools.ts 使用ConfigurationProvider可以无需编辑配置文件,自动让Cpptools使用xmake生成的配置