xmake-io / xmake-vscode

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

在工具栏中更改编译选项后compile_commands.json没有更新 #185

Closed wanzzhehe closed 1 year ago

wanzzhehe commented 1 year ago

Xmake 版本

2.7.8

操作系统版本和架构

Windows 11 version 22H2

描述问题

在使用状态栏更新编译选项后,compile_commands.json 文件没有更新;

我通过查看源码,发现只有在编辑 xmake.lua 文件后才会更新 compile_commands.json,这样同样会导致另一个问题,就是如果是在配置文件中使用通配符 * 匹配文件的话,那么在 src/ 文件夹下新添加源代码文件,就只能通过手动调用 XMake.UpdateIntellisense 来更新 compile_commands.json,非常不方便,不过个人认为这不算个BUG。

期待的结果

期望在状态栏更新编译选项,或者在使用xmake构建完成后更新 compile_commands.json 文件(也能适应新添加源代码文件的情况)。

工程配置

No response

附加信息和错误日志

No response

waruqi commented 1 year ago

你可以 xmake.lua 配置上这个,每次 build 后自动更新 https://xmake.io/#/zh-cn/plugin/more_plugins?id=%e7%94%9f%e6%88%90-compile_commands

wanzzhehe commented 1 year ago

你可以 xmake.lua 配置上这个,每次 build 后自动更新 https://xmake.io/#/zh-cn/plugin/more_plugins?id=%e7%94%9f%e6%88%90-compile_commands

好的,十分感谢