feat: 新增 CSS 和 Rust 专业代码格式化器

集成 lightningcss 和 syn 库,为代码格式化工具添加 CSS 和 Rust 语言的专业格式化能力。同时重构 XML
   格式化器,使用 roxmltree 和 quick-xml 替代纯函数实现,提升解析准确性和性能。
This commit is contained in:
2026-03-17 19:49:13 +08:00
parent 910a50fa45
commit 55845d2b57
11 changed files with 1087 additions and 428 deletions

View File

@@ -34,6 +34,19 @@ markup_fmt = "0.18"
minify-html = "0.15"
html5ever = "0.27"
# XML 处理相关依赖(专业解析库)
roxmltree = "0.20"
quick-xml = { version = "0.37", features = ["serialize"] }
# JavaScript/TypeScript - 暂时保留通用格式化
# (SWC/deno_ast 有依赖兼容性问题,跳过)
# CSS 处理相关依赖
lightningcss = "1.0.0-alpha.50"
# Rust 处理相关依赖
syn = { version = "2", features = ["full", "extra-traits"] }
[target.'cfg(windows)'.dependencies]
windows = { version = "0.58", features = [
"Win32_Foundation",