QOwnNotes/treefmt.toml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

77 lines
1.7 KiB
TOML
Raw Normal View History

# https://github.com/numtide/treefmt
# https://github.com/numtide/treefmt-nix
on-unmatched = "info"
[formatter.clang-format]
command = "clang-format"
options = ["-i"]
# Only target the exact directories we want
includes = [
# Non-recursive for src root
"src/*.cpp",
"src/*.h",
# Recursive for specific subdirectories
"src/entities/**/*.cpp",
"src/entities/**/*.h",
"src/utils/**/*.cpp",
"src/utils/**/*.h",
"src/helpers/**/*.cpp",
"src/helpers/**/*.h",
"src/services/**/*.cpp",
"src/services/**/*.h",
"src/widgets/**/*.cpp",
"src/widgets/**/*.h",
"src/dialogs/**/*.cpp",
"src/dialogs/**/*.h",
"src/api/**/*.cpp",
"src/api/**/*.h",
"src/libraries/piwiktracker/**/*.cpp",
"src/libraries/piwiktracker/**/*.h",
"src/libraries/qmarkdowntextedit/**/*.cpp",
"src/libraries/qmarkdowntextedit/**/*.h",
# Recursive for tests
"tests/unit_tests/**/*.cpp",
"tests/unit_tests/**/*.h",
]
# Explicitly exclude everything else
excludes = [
# Exclude everything not explicitly included
"src/libraries/**/*.cpp",
"src/libraries/**/*.cxx",
"src/libraries/**/*.c",
"src/libraries/**/*.h",
"src/libraries/**/*.hxx",
# You can add more specific exclusions here as needed
]
[formatter.prettier]
command = "prettier"
options = ["--write"]
includes = ["webpage/**/*.vue", "webpage/**/*.js", "*.md", "*.yaml", "*.yml"]
[formatter.shfmt]
command = "shfmt"
excludes = []
includes = ["*.sh", "*.bash", "*.envrc", "*.envrc.*"]
options = ["-s", "-w", "-i", "2"]
[formatter.just]
command = "just"
includes = ["*.just"]
[formatter.taplo]
command = "taplo"
includes = ["*.toml"]
options = ["format"]
[formatter.nixfmt-rfc-style]
command = "nixfmt"
excludes = []
includes = ["*.nix"]
options = []