Lua was originally designed as a config language.
Re:What Is Wrong with TOML?
by gavinhoward on Wednesday September 13, 2023 @04:25PM
(#37501283)
Sure, but I would say that anything that is Turing-complete is not a good config language.
Lua pivoted to plugins instead.
I wrote a config file format. I took JSON and added comments, strict typing (using one character for any type that needs a marker), the ability to split items with newlines instead of commas, trailing commas, explicit binary data (as base64), and a new type I call "symbols" for things like enums or references. Then I removed the need to surround keys with quotes if they have only a certain set of typical characters.
It looks like [1].
It turns out that JSON was very close. It just needed a few more things.
Edit: one thing about config file formats that I strongly believe is that they must be purely data, no code. If you need code, supplement them with a separate thing, and perhaps use an established language, like Lua.
[1]: https://git.yzena.com/Yzena/Yc/src/branch/master/build.gaml