summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorflga <flga@users.noreply.github.com>2023-07-06 20:39:38 +0100
committerflga <flga@users.noreply.github.com>2023-07-06 20:39:38 +0100
commit9e886874e728b038ef39710444262b85d4d452db (patch)
tree72483cd76fd986c327089511dce738ed1e692d90 /tools
parentce93ef6b66c9e7cd3562945ad21acd27305aef9d (diff)
Add a new config option to allow multiline composite literals
Diffstat (limited to 'tools')
-rw-r--r--tools/odinfmt/snapshot/snapshot.odin7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/odinfmt/snapshot/snapshot.odin b/tools/odinfmt/snapshot/snapshot.odin
index d5bdbd2..ef6239d 100644
--- a/tools/odinfmt/snapshot/snapshot.odin
+++ b/tools/odinfmt/snapshot/snapshot.odin
@@ -19,6 +19,7 @@ format_file :: proc(
style := format.default_style
style.character_width = 80
style.newline_style = .LF //We want to make sure it works on linux and windows.
+ style.multiline_composite_literals = true
if data, ok := os.read_entire_file(filepath, allocator); ok {
return format.format(
@@ -79,9 +80,9 @@ snapshot_file :: proc(path: string) -> bool {
if os.exists(snapshot_path) {
if snapshot_data, ok := os.read_entire_file(
- snapshot_path,
- context.temp_allocator,
- ); ok {
+ snapshot_path,
+ context.temp_allocator,
+ ); ok {
snapshot_scanner := scanner.Scanner{}
scanner.init(&snapshot_scanner, string(snapshot_data))
formatted_scanner := scanner.Scanner{}