chore: 添加.gitattributes规范行尾符处理

- 设置text=auto自动检测文本文件
- 为常见源代码文件指定LF行尾符
- 解决Windows/WSL环境切换时的行尾符差异问题
This commit is contained in:
fmq 2026-06-06 15:27:47 +08:00
parent 554b5418ee
commit 4932a87fc1
5 changed files with 51 additions and 4 deletions

View File

@ -11,8 +11,8 @@
"Grep",
"Glob",
"Bash(make test-math:*)",
"Bash(ls -la /home/fmq/program/tlusty/tl208-s54/rust/*)",
"Bash(wc -l /home/fmq/program/tlusty/tl208-s54/rust/*)"
"Bash(ls -la /home/dckj/SpectraRust/*)",
"Bash(wc -l /home/dckj/SpectraRust/*)"
],
"deny": [
"Bash(rm -rf *)",
@ -20,8 +20,9 @@
"Bash(curl *)"
],
"additionalDirectories": [
"/home/fmq/program/tlusty/tl208-s54/rust",
"/home/fmq/program/tlusty/tl208-s54/tlusty"
"/home/dckj/SpectraRust",
"/home/dckj/SpectraRust/tlusty",
"/home/dckj/SpectraRust/src"
]
}
}

View File

@ -0,0 +1,4 @@
{
"enabledMcpjsonServers": [],
"enableAllProjectMcpServers": true
}

39
.gitattributes vendored Normal file
View File

@ -0,0 +1,39 @@
# Auto detect text files and perform LF normalization
* text=auto
# Explicitly declare text files
*.rs text eol=lf
*.py text eol=lf
*.md text eol=lf
*.toml text eol=lf
*.json text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
# Declare files that will always have CRLF line endings on checkout
*.sln text eol=crlf
# Denote all files that are truly binary and should not be modified
*.png binary
*.jpg binary
*.gif binary
*.ico binary
*.mov binary
*.mp4 binary
*.mp3 binary
*.flv binary
*.flac binary
*.jar binary
*.war binary
*.nar binary
*.ear binary
*.zip binary
*.tar binary
*.gz binary
*.xz binary
*.bz2 binary
*.7z binary
*.pdf binary
*.docx binary
*.xlsx binary
*.pptx binary

3
.gitignore vendored
View File

@ -50,3 +50,6 @@ desktop.ini
__pycache__
synspec/extracted/
tlusty/extracted/
*.csv