Changes
4 changed files (+58/-26)
-
-
@@ -72,11 +72,17 @@ G_MESSAGES_DEBUG=Plac zig build run### Code Formatting This project uses [dprint](https://dprint.dev/) as a code formatter frontend. After installing system dependencies, you can format source code by: This project uses [treefmt](https://treefmt.com) as a code formatter frontend. In addition to system dependencies, you need these formatter softwares: - dprint - Uncrustify - nixfmt After installing required softwares, you can format source code by: ``` dprint fmt treefmt ``` ### License Checking
-
-
-
@@ -27,32 +27,9 @@"useTabs": true, "json": {}, "markdown": {}, "exec": { "cwd": "${configDir}", "commands": [ { "exts": ["zig"], "command": "zig fmt --stdin", }, { "exts": ["zon"], "command": "zig fmt --zon --stdin", }, { "exts": ["vala"], "command": "uncrustify -c uncrustify.cfg -l VALA", "cacheKeyFiles": ["uncrustify.cfg"], }, { "exts": ["nix"], "command": "nixfmt --strict --width={{line_width}} --indent={{indent_width}}", }, ], }, "plugins": [ "https://plugins.dprint.dev/json-0.20.0.wasm", "https://plugins.dprint.dev/markdown-0.18.0.wasm", "https://plugins.dprint.dev/exec-0.6.0.json@a054130d458f124f9b5c91484833828950723a5af3f8ff2bd1523bd47b83b364", "https://plugins.dprint.dev/toml-0.7.0.wasm", ], }
-
-
-
@@ -78,9 +78,14 @@vala-language-server # Code formatter # Called by treefmt # https://dprint.dev/ dprint # Code formatter # https://github.com/numtide/treefmt treefmt # Copyright and license linter based on SPDX # https://github.com/fsfe/reuse-tool reuse
-
-
treefmt.toml (new)
-
@@ -0,0 +1,44 @@# Copyright 2025 Shota FUJI # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # SPDX-License-Identifier: Apache-2.0 # # Configuration file for treefmt <https://treefmt.com>, formatter frontend. excludes = ["LICENSES"] [formatter.dprint] command = "dprint" options = ["fmt"] includes = ["*.md", "*.json", "*.jsonc", "*.toml"] [formatter.zig] command = "zig" options = ["fmt"] includes = ["*.zig"] [formatter.zon] command = "zig" options = ["fmt", "--zon"] includes = ["*.zon"] [formatter.vala] command = "uncrustify" options = ["-c", "uncrustify.cfg", "-l", "VALA", "--replace", "--no-backup"] includes = ["*.vala"] [formatter.nix] command = "nixfmt" options = ["--strict", "--width=100", "--indent=2"] includes = ["*.nix"]
-