Vscode-yaml: Add Config for Array Indentation Spacing

Created on 27 Mar 2019  路  8Comments  路  Source: redhat-developer/vscode-yaml

I'm working with Jekyll for GitHub Pages, which uses the Ruby gem for parsing YAML. This gem prefers this spacing in Arrays:

---
simple_val: Testing 1
object_val:
  sub_object_val: Testing 2
array_val:
- Testing 3
- Testing 4

However, when auto-formatter is on, this gets converted to:

---
simple_val: Testing 1
object_val:
  sub_object_val: Testing 2
array_val:
  - Testing 3
  - Testing 4

Regardless of preference, it would be great to have an option to disable adding space indention for arrays.

formatter

All 8 comments

Hi, any plans to add this config?

+1 on this one

This all depends on prettier adding this configuration or seeing if they have some api that allows to change array configuration.

This all depends on prettier adding this configuration or seeing if they have some api that allows to change array configuration.

And per https://github.com/prettier/prettier/issues/4723, Prettier is decided to stay at do indent in mapping.

+1 for this, my dev teams preferred option is not to indent

+1 for this. :)

Also need this option

Another +1

Was this page helpful?
0 / 5 - 0 ratings