From 54d3bed6300a3c08f5655fdac560caa48e83c881 Mon Sep 17 00:00:00 2001 From: Spencer Brower <6729162+sbrow@users.noreply.github.com> Date: Thu, 30 Jul 2026 13:49:19 -0400 Subject: [PATCH] build(nix): Updated prettier config. --- flake.nix | 15 +++++++++++++-- frontmatter.odin | 1 - menus.odin | 1 - menus_test.odin | 5 +---- mustache/data.odin | 1 - mustache/mustache.odin | 1 - test_thor_icons.json | 9 ++++++++- treesitter/treesitter.odin | 1 - vfs.odin | 1 - 9 files changed, 22 insertions(+), 13 deletions(-) diff --git a/flake.nix b/flake.nix index 921ffc6..7b6987d 100644 --- a/flake.nix +++ b/flake.nix @@ -91,11 +91,22 @@ settings.formatter.prettier = { excludes = [ "public/**" - "resources/js/modernizr.js" - "storage/app/caniuse.json" + "mustache/spec/specs/**" + "*.html" "*.md" ]; }; + + settings.formatter.ols = { + command = "${pkgs.bash}/bin/bash"; + options = [ + "-euc" + '' + ${pkgs.ols}/bin/odinfmt -w . + '' + ]; + includes = [ "*.odin" ]; + }; }; #process-compose.default.settings.processes = { }; diff --git a/frontmatter.odin b/frontmatter.odin index 908769f..4a47ade 100644 --- a/frontmatter.odin +++ b/frontmatter.odin @@ -117,4 +117,3 @@ json_get_open_graph :: proc(obj: json.Object, key: string) -> Open_Graph { } return og } - diff --git a/menus.odin b/menus.odin index 26d9d62..5374e8f 100644 --- a/menus.odin +++ b/menus.odin @@ -388,4 +388,3 @@ parse_config_menus :: proc( return result } - diff --git a/menus_test.odin b/menus_test.odin index 1ac1558..a8b7adf 100644 --- a/menus_test.odin +++ b/menus_test.odin @@ -472,10 +472,7 @@ test_warn_duplicate_weights_nil_not_flagged :: proc(t: ^testing.T) { logger := log.create_file_logger(f) context.logger = logger - entries := []Menu_Entry { - {name = "Alpha", url = "/a/"}, - {name = "Beta", url = "/b/"}, - } + entries := []Menu_Entry{{name = "Alpha", url = "/a/"}, {name = "Beta", url = "/b/"}} warn_duplicate_weights("main", entries) log.destroy_file_logger(logger) diff --git a/mustache/data.odin b/mustache/data.odin index e0dd657..c859a43 100644 --- a/mustache/data.odin +++ b/mustache/data.odin @@ -302,4 +302,3 @@ write_value :: proc(b: ^strings.Builder, a: any, escape: bool) { strings.write_string(b, s[start:]) } } - diff --git a/mustache/mustache.odin b/mustache/mustache.odin index ade4ea4..9165872 100644 --- a/mustache/mustache.odin +++ b/mustache/mustache.odin @@ -985,4 +985,3 @@ warn_context_depth :: proc(current: Template, node: Node) { diag := format_error(path, current.source, node.pos, msg, "", colorize = should_colorize()) log.warnf("%s", diag) } - diff --git a/test_thor_icons.json b/test_thor_icons.json index 14bc0f3..1f71993 100644 --- a/test_thor_icons.json +++ b/test_thor_icons.json @@ -1 +1,8 @@ -{"params":{"social":[{"name":"github","url":"https://github.com/test"},{"name":"rss","url":"/index.xml"}]}} \ No newline at end of file +{ + "params": { + "social": [ + { "name": "github", "url": "https://github.com/test" }, + { "name": "rss", "url": "/index.xml" } + ] + } +} diff --git a/treesitter/treesitter.odin b/treesitter/treesitter.odin index f3a6d66..bf44217 100644 --- a/treesitter/treesitter.odin +++ b/treesitter/treesitter.odin @@ -459,4 +459,3 @@ helix_version_from_path :: proc(path: string) -> string { if end <= start do return "" return path[start:end] } - diff --git a/vfs.odin b/vfs.odin index 4934be7..c41e865 100644 --- a/vfs.odin +++ b/vfs.odin @@ -109,4 +109,3 @@ vfs_entry_data :: proc(entry: VFS_Entry) -> ([]byte, bool) { } return data, true } -