apache / netbeans

Apache NetBeans
https://netbeans.apache.org/
Apache License 2.0
2.63k stars 840 forks source link

Yaml formatter does not format spaces per indent #4539

Open hlavki opened 2 years ago

hlavki commented 2 years ago

Apache NetBeans version

Apache NetBeans 15 release candidate

What happened

When I change Number of Spaces per Indent for Yaml language to 2 and open YAML file indented with 4 spaces, click to format and nothing happens.

How to reproduce

change Number of Spaces per Indent for Yaml language to 2: image

Open YAML file indented with 4 spaces and click Format.

Did this work correctly in an earlier version?

No / Don't know

Operating System

Linux 5.19.2-1-default, openSUSE Tumbleweed, x86_64

JDK

OpenJDK 64-Bit Server VM 11.0.16+8-suse-1.1-x8664

Apache NetBeans packaging

Own source build

Anything else

No response

Are you willing to submit a pull request?

No

Code of Conduct

Yes

mbien commented 2 years ago

@lkishalmi ping

lkishalmi commented 2 years ago

At the moment there is no reformatting support for Yaml. The action got enabled with the change #1742 which is actually enabled that at least the editor can set the indent to two spaces. Reformatting is yet to be implemented. Till then this issue is about why the reformatting action is enabled.