fmt: reformat *.toml with tombi, add tombi to treefmt.nix

This commit is contained in:
2026-08-29 09:49:32 +08:00
parent dd0097a1f8
commit 8b141b9da0
5 changed files with 53 additions and 43 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ symbol = " "
symbol = " " symbol = " "
[git_commit] [git_commit]
tag_symbol = '' tag_symbol = ""
[golang] [golang]
symbol = " " symbol = " "
@@ -6,44 +6,44 @@
# Default colors # Default colors
[colors.primary] [colors.primary]
background = '#24283b' background = "#24283b"
foreground = '#c0caf5' foreground = "#c0caf5"
[colors.cursor] [colors.cursor]
cursor = '#c0caf5' cursor = "#c0caf5"
text = '#24283b' text = "#24283b"
[colors.selection] [colors.selection]
text = '#c0caf5' text = "#c0caf5"
background = '#2e3c64' background = "#2e3c64"
# Normal colors # Normal colors
[colors.normal] [colors.normal]
black = '#1d202f' black = "#1d202f"
red = '#f7768e' red = "#f7768e"
green = '#9ece6a' green = "#9ece6a"
yellow = '#e0af68' yellow = "#e0af68"
blue = '#7aa2f7' blue = "#7aa2f7"
magenta = '#bb9af7' magenta = "#bb9af7"
cyan = '#7dcfff' cyan = "#7dcfff"
white = '#a9b1d6' white = "#a9b1d6"
# Bright colors # Bright colors
[colors.bright] [colors.bright]
black = '#414868' black = "#414868"
red = '#ff899d' red = "#ff899d"
green = '#9fe044' green = "#9fe044"
yellow = '#faba4a' yellow = "#faba4a"
blue = '#8db0ff' blue = "#8db0ff"
magenta = '#c7a9ff' magenta = "#c7a9ff"
cyan = '#a4daff' cyan = "#a4daff"
white = '#c0caf5' white = "#c0caf5"
# Indexed Colors # Indexed Colors
[[colors.indexed_colors]] [[colors.indexed_colors]]
index = 16 index = 16
color = '#ff9e64' color = "#ff9e64"
[[colors.indexed_colors]] [[colors.indexed_colors]]
index = 17 index = 17
color = '#db4b4b' color = "#db4b4b"
@@ -5,10 +5,10 @@ wallpaper = "~/workspace/nixos-dotfiles/assets/wallpaper.png"
enabled = true enabled = true
schema_version = 2 schema_version = 2
widget_order = [ widget_order = [
"lockscreen-login-box@DP-1", "lockscreen-login-box@DP-1",
"lockscreen-login-box@DP-2", "lockscreen-login-box@DP-2",
"lockscreen-widget-clock@DP-1", "lockscreen-widget-clock@DP-1",
"lockscreen-widget-clock@DP-2", "lockscreen-widget-clock@DP-2",
] ]
[lockscreen_widgets.grid] [lockscreen_widgets.grid]
+20 -5
View File
@@ -1,12 +1,27 @@
{ inputs, ... }: { inputs, ... }: {
{ imports = [
imports = [ inputs.treefmt.flakeModule ]; inputs.treefmt.flakeModule
perSystem.treefmt = { ];
perSystem.treefmt = { lib, pkgs, ... }: {
projectRootFile = "flake.nix"; projectRootFile = "flake.nix";
programs = { programs = {
nixfmt.enable = true; nixfmt.enable = true;
stylua.enable = true;
keep-sorted.enable = true; keep-sorted.enable = true;
stylua.enable = true;
}; };
settings.formatter.tombi = {
command = "${pkgs.bash}/bin/bash";
options = [
"-euc"
''
for file in "$@"; do
${lib.getExe pkgs.tombi} fmt $file
done
''
"--"
];
includes = [ "*.toml" ];
};
settings.excludes = [ "secrets/*" ];
}; };
} }
+4 -9
View File
@@ -1,18 +1,13 @@
#:schema https://raw.githubusercontent.com/crate-ci/typos/refs/heads/master/config.schema.json #:schema https://raw.githubusercontent.com/crate-ci/typos/refs/heads/master/config.schema.json
[files] [files]
extend-exclude = [ extend-exclude = ["secrets"]
"secrets"
] [default]
extend-ignore-identifiers-re = ["KEY_102ND", "VE_UE"]
[default.extend-words] [default.extend-words]
# noice.nvim # noice.nvim
noice = "noice" noice = "noice"
enew = "enew" enew = "enew"
iif = "iif" iif = "iif"
[default]
extend-ignore-identifiers-re = [
"KEY_102ND",
"VE_UE"
]