Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Auto formatting for list #179

Closed
joshuaavalon opened this issue May 2, 2019 · 1 comment
Closed

[Feature Request] Auto formatting for list #179

joshuaavalon opened this issue May 2, 2019 · 1 comment
Assignees
Milestone

Comments

@joshuaavalon
Copy link

Assume | is the cursor.

Currently, when you press enter in the list

list:
  - item|

It will add the indentation but not -

list:
  - item
  |

I suggest that it should add - if you are in a list.

list:
  - item
  - |
@fabstu
Copy link

fabstu commented Nov 23, 2020

Another testcase here. This one works correctly:

- download:
  name: "Hello World"
  url: "value"

But this one does not.

- download:
      name: "Hello World"
      url: "value"

The issue is that in one case download, url and name are in the same object and in the other download is the parent object which contains name and download. It moves name and url in the second on each format instead of keeping it the same/putting it at the correct indentation of a sub-item.

Note:

@evidolob evidolob self-assigned this Nov 24, 2020
@evidolob evidolob added this to the 0.15.0 milestone Jan 18, 2021
bleach31 pushed a commit to bleach31/vscode-yaml that referenced this issue Jan 25, 2022
…mentFormattingOnPaste

Remove document formatting range registration and make formatting wor…
bleach31 pushed a commit to bleach31/vscode-yaml that referenced this issue Jan 25, 2022
* redhat-developer#179 add 'doDocumentOnTypeFormatting' implementation

Signed-off-by: Yevhen Vydolob <[email protected]>

* add tests

Signed-off-by: Yevhen Vydolob <[email protected]>

* add handler

Signed-off-by: Yevhen Vydolob <[email protected]>

* add missing trigger character

Signed-off-by: Yevhen Vydolob <[email protected]>

* Update tests

Signed-off-by: Yevhen Vydolob <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants