From 0a0af53af19a8a997e52980b4f26770f90a4d818 Mon Sep 17 00:00:00 2001 From: Youmu Liu <105042599+Nitload-NSI@users.noreply.github.com> Date: Fri, 6 Mar 2026 18:30:56 +0800 Subject: [PATCH] tex layout improve --- .editorconfig | 11 ++++++++- .gitattributes | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 .gitattributes diff --git a/.editorconfig b/.editorconfig index 5ef69c5a..48b7b7e1 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,4 +1,13 @@ -[*.cs] +[*] +end_of_line = lf +charset = utf-8 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.{bat,cmd,ps1}] +end_of_line = crlf + +[*.cs] # CS1591: 缺少对公共可见类型或成员的 XML 注释 dotnet_diagnostic.CS1591.severity = suggestion diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..2e12e4e3 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,61 @@ +# ══════════════════════════════════════════════ +# StgSharp line ending policy +# +# 仓库内统一 LF(Linux 编译兼容) +# Windows 上 checkout 时 Git 自动转 CRLF +# VS2022 / Rider / VSCode 都认这个文件 +# ══════════════════════════════════════════════ + +# ── 默认:所有文本文件入库 LF ── +* text=auto eol=lf + +# ── 源码 ── +*.cs text eol=lf +*.c text eol=lf +*.cpp text eol=lf +*.h text eol=lf +*.hpp text eol=lf + +# ── .NET 项目文件 ── +*.csproj text eol=lf +*.sln text eol=lf +*.props text eol=lf +*.targets text eol=lf + +# ── 配置 / 文档 ── +*.json text eol=lf +*.xml text eol=lf +*.config text eol=lf +*.yml text eol=lf +*.yaml text eol=lf +*.md text eol=lf +*.txt text eol=lf + +# ── 构建脚本 ── +*.sh text eol=lf +*.bash text eol=lf +*.cmake text eol=lf +CMakeLists.txt text eol=lf + +# ── Windows 脚本(这几个必须 CRLF 否则 cmd 会出问题)── +*.bat text eol=crlf +*.cmd text eol=crlf +*.ps1 text eol=crlf + +# ── 二进制:不动 ── +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.ico binary +*.dll binary +*.exe binary +*.pdb binary +*.so binary +*.dylib binary +*.lib binary +*.obj binary +*.a binary +*.zip binary +*.7z binary +*.gz binary \ No newline at end of file