Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Taplo formatting for TOML files #295

Merged
merged 1 commit into from
Mar 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ jobs:
- name: cargo fmt
run: cargo fmt --all --check

- name: Install Taplo
uses: uncenter/setup-taplo@09968a8ae38d66ddd3d23802c44bf6122d7aa991 # v1
with:
version: "0.9.3"

- name: Run taplo fmt
run: taplo fmt --check --diff

- name: install ripgrep
run: |
sudo apt update
Expand Down
11 changes: 11 additions & 0 deletions .taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# See https://taplo.tamasfe.dev/configuration/file.html
# and https://taplo.tamasfe.dev/configuration/formatter-options.html

[formatting]
# Aligning comments with the largest line creates
# diff noise when neighboring lines are changed.
align_comments = false

# Matches how rustfmt formats Rust code
column_width = 100
indent_string = " "
34 changes: 26 additions & 8 deletions fontique/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ icu_properties = ["dep:icu_properties"]
unicode_script = ["dep:unicode-script"]
# Enables support for system font backends
system = [
"std",
"dep:windows", "dep:windows-core",
"dep:objc2-core-foundation", "dep:objc2-core-text", "dep:objc2-foundation",
"dep:fontconfig-cache-parser", "dep:roxmltree",
"std",
"dep:windows",
"dep:windows-core",
"dep:objc2-core-foundation",
"dep:objc2-core-text",
"dep:objc2-foundation",
"dep:fontconfig-cache-parser",
"dep:roxmltree",
]

[dependencies]
Expand All @@ -42,13 +46,27 @@ icu_locid = "1.5.0"
hashbrown = { workspace = true }

[target.'cfg(target_os = "windows")'.dependencies]
windows = { version = "0.58.0", features = ["implement", "Win32_Graphics_DirectWrite"], optional = true }
windows = { version = "0.58.0", features = [
"implement",
"Win32_Graphics_DirectWrite",
], optional = true }
windows-core = { version = "0.58", optional = true }

[target.'cfg(target_vendor = "apple")'.dependencies]
objc2-foundation = { version = "0.3.0", optional = true, default-features = false, features = ["alloc", "NSArray", "NSEnumerator", "NSPathUtilities", "NSString"] }
objc2-core-foundation = { version = "0.3.0", optional = true, default-features = false, features = ["CFBase"] }
objc2-core-text = { version = "0.3.0", optional = true, default-features = false, features = ["CTFont", "CTFontDescriptor"] }
objc2-foundation = { version = "0.3.0", optional = true, default-features = false, features = [
"alloc",
"NSArray",
"NSEnumerator",
"NSPathUtilities",
"NSString",
] }
objc2-core-foundation = { version = "0.3.0", optional = true, default-features = false, features = [
"CFBase",
] }
objc2-core-text = { version = "0.3.0", optional = true, default-features = false, features = [
"CTFont",
"CTFontDescriptor",
] }

[target.'cfg(target_os = "linux")'.dependencies]
fontconfig-cache-parser = { version = "0.2.0", optional = true }
Expand Down
Loading