tweag / nickel

Better configuration for less
https://nickel-lang.org/
MIT License
2.39k stars 89 forks source link

Add lua , c , c++ , js , python , go to format options #2040

Open rudy-in opened 1 month ago

rudy-in commented 1 month ago

the thing is explained above

rudy-in commented 1 month ago

Also can you add something like lua to nickel and toml to nickel , would be alot helpful thank you

yannham commented 1 month ago

Hello, I think the issue is missing a bit of context. What do you mean by "format options"? Are talking about the --format argument of nickel export? In that case, what does this mean to export a record to e.g. C++?

Or maybe I should put it differently: what are you trying to do precisely, so that we can understand better what we could do about it.

rudy-in commented 1 month ago

i need more format options , even if you cant add c , c++ in that its okay , but can you add lua , go , python and js to it? yes im talking about nickel export the --format flag , i can also help yall but im not familiar with the codebase right now understanding , the reason why i need it is because im kinda using this lang as a main language for my independent distro

yannham commented 1 month ago

I think my question is what do you want to do with the exported data? For example, in Python, wouldn't that be much easier to just export to JSON and read the JSON from Python to turn that into a dictionary? I would imagine that Lua can load JSON easily as well.

I can understand that for compiled language it's a bit different if you want your config to be available at compile-time.

rudy-in commented 1 month ago

reading json is easy in python