Closed jonas-w closed 7 months ago
I'm using NixOS, and it uses https://github.com/remarshal-project/remarshal to convert the configuration to TOML. Remarshal uses tomlkit to create the final toml file.
I want to create a languages.toml for helix e.g.:
[[language]] name = "test" formatter = { command = "test" }
Now in Nix which looks kinda like toml/json, I would write:
# ... language = [ { name = "test"; formatter = { command = "test"; }; } ]; # ...
Which would be the same as the toml above, and which also would be the same as the following json:
{ "languages":[ { "name":"test", "formatter":{ "command":"test" } } ] }
But if I convert the following to toml with tomlkit I receive the following toml output:
>>> import tomlkit >>> d = { ... "languages":[ ... { ... "name":"test", ... "formatter":{ ... "command":"test" ... } ... } ... ] ... } >>> print(tomlkit.dumps(d)) [[languages]] name = "test" [languages.formatter] command = "test"
Yikes, nvm that really is valid TOML.
I'm using NixOS, and it uses https://github.com/remarshal-project/remarshal to convert the configuration to TOML. Remarshal uses tomlkit to create the final toml file.
I want to create a languages.toml for helix e.g.:
Now in Nix which looks kinda like toml/json, I would write:
Which would be the same as the toml above, and which also would be the same as the following json:
But if I convert the following to toml with tomlkit I receive the following toml output: