Clang-format:如何以这种方式格式化C结构初始化程序

问题描述

我使用的是Linux内核.clang格式作为参考,但这部分困扰着我。

如何获取clang格式的代码

const struct my_struct hello = {.id = 0,.modsmin = 10,.modsmax = 20,.strengthmin = 0,.strengthmax = 100,.color = COLOR_FOREGROUND };

对此

const struct my_struct hello = {
    .id = 0,.color = COLOR_FOREGROUND
};

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)