Skip to content

Commit 78ff7ad

Browse files
committed
尝试解决不同IDE下editorconfig不同的表现
1 parent 844cd55 commit 78ff7ad

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.editorconfig

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,29 @@
1+
# --------------------------------------------------------------
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
# --------------------------------------------------------------
4+
# Config Type : EditorConfig
5+
# Config Authors: 曾奥然 <[email protected]>
6+
# Contributors : Nil Null <[email protected]>
7+
# Created On : <2023-09-06>
8+
# Last Modified : <2025-08-27>
9+
#
10+
# 请参考 ./doc/03-为什么拒绝使用代码格式化工具.md
11+
#
112
# http://editorconfig.org
13+
# --------------------------------------------------------------
14+
215
root = true
316

417
[*]
518
indent_style = space
619
indent_size = 2
720
charset = utf-8
821
trim_trailing_whitespace = true
9-
insert_final_newline = false
22+
23+
# VS Code 对该配置(为 false)的实现有问题,这是确定的,
24+
# 然而 CLion 似乎对该配置(为 false)的实现是正确的,这导致不同贡献者反而产生了冲突
25+
# 所以我们现在改成 true
26+
insert_final_newline = true
1027

1128
[*.{c,C,cpp,cxx,cc,h,hpp}]
1229
indent_style = space

0 commit comments

Comments
 (0)