Disable odin formatter for a specific file?

i currently have odinfmt configured, and 90% of the times it works very well, but sometimes it ends up killing some manual formatting that might be better

i don’t want to turn it off completely, or turn off format-on-type / format-on-save, because like i said, it usually works very well

is there a way to turn it off per file? like // clang-format off?

You can use

// odinfmt: disable

and

// odinfmt: enable

to mark sections within a file.

Edit: Maybe a disable statement at the beginning of the file works as well?

1 Like

tysm i didn’t know about this
i’ll try it out

this works very well
i didn’t know about the comment, and is very helpful

1 Like