question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TOML formatting option around key alignment

See original GitHub issue

Is 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:closed
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
FujiHarukacommented, Aug 29, 2021

@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.

2reactions
FujiHarukacommented, Jul 28, 2021

Here I am. I didn’t change around stringify code, but I’m interested in your issue.

Cargo’s standard does not align them

Then, it might be better not to align. I’ll also take a look at other toml parsers.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found