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

formatting not respecting yaml spec 1.2 for Collections #66

Open
kjgen opened this issue Aug 17, 2022 · 4 comments
Open

formatting not respecting yaml spec 1.2 for Collections #66

kjgen opened this issue Aug 17, 2022 · 4 comments

Comments

@kjgen
Copy link

kjgen commented Aug 17, 2022

I have configure the yaml.format.enable to true and I'm using the Azure pipelines yaml schema. I also have the coc configuration format on save set to true. When I save the document, it indents my collection elements instead of keeping them on the same vertical line.
Example:
Before

steps:
- task: ABC
  inputs:
    test: hello

After formatting:

steps:
  - task: ABC
    inputs:
      test: hello

The formatting shouldn't change the indentation of the collection if we follow the yaml spec 1.2. Why is this happening?

@chemzqm
Copy link
Member

chemzqm commented Aug 18, 2022

Should be problem of your language server, checkout https://github.com/neoclide/coc.nvim/wiki/Debug-language-server#using-output-channel

@kjgen
Copy link
Author

kjgen commented Aug 18, 2022

I looked into the language server output but didn't bring me much additional information. I did find the following PR that was merged into eemeli/yaml. The PR adds the ability to configure the indentation. eemeli/yaml#147 . I'll see if I can find in the coc-yaml code if this is used somewhere

@impguard
Copy link

would love an option to disable collection indenting.

@martin-braun
Copy link

For me the formatter isn't working at all, despite setting css.format.enable to true.

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