TOML formatting option around key alignment
See original GitHub issueIs your feature request related to a problem? Please describe.
I am modifying TOMLs in Deno. Currently when decoding/parsing the following:
name = "myproject"
version = "0.1.0"
Encoding/to-stringing it space aligns the keys, resulting in:
name = "myproject"
version = "0.1.0"
Describe the solution you’d like
I would like either by default or by optional setting to not add the alignment. Cargo’s standard does not align them, I would like to retain the non key aligned formatting 😃
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
A style guide for toml? · Issue #608 - GitHub
But I think we can make a style guide just like https://www.python.org/dev/peps/pep-0008/ . For example, Use 4 spaces per indentation level. or ...
Read more >Python and TOML: New Best Friends
TOML is a configuration file format that's becoming increasingly popular in ... TOML is built around key-value pairs that map nicely to hash ......
Read more >Configuration - Helix
All but the last key listed in the default file-picker configuration below are IgnoreOptions: whether hidden files and files listed within ignore files...
Read more >toml-intro.rst - American University
We demonstrate that the TOML format can be useful for the documentation of these components and can provide a language-agnostic information-exchange format ......
Read more >Use a configuration file - EthSigner - latest - ConsenSys
To specify command line options in a file, use a TOML configuration file. Save the configuration file and reuse it across node startups....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@kaleidawave Thank you for your explaining. It makes sense to me. Then in my opinion it would be better if making keys not aligned is default and aligned is an optional.
Here I am. I didn’t change around
stringify
code, but I’m interested in your issue.Then, it might be better not to align. I’ll also take a look at other toml parsers.