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

Use yaml package for formatting #983

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

remcohaszing
Copy link
Contributor

What does this PR do?

This replaces Prettier as the LSP formatting solution with the yaml package. The yaml package can format YAML just fine, and we already have it as a dependency. Prettier is a big dependency.

If people want to use Prettier, other Prettier integrations are probably better suited for them. For example, the YAML language server doesn’t respect Prettier configuration files.

This is a proof of concept. I tried to map existing options to the new implementation. A more ideal solution might be to change the formatting options.

What issues does this PR fix or reference?

Refs #933

Is it tested? How?

npm test

I discovered eemeli/yaml#562 while working on this.

This replaces Prettier as the LSP formatting solution with the `yaml`
package. The `yaml` package can format YAML just fine, and we already
have it as a dependency. Prettier is a big dependency.

If people want to use Prettier, other Prettier integrations are probably
better suited for them. For example, the YAML language server doesn’t
respect Prettier configuration files.

This is a proof of concept. I tried to map existing options to the new
implementation. A more ideal solution might be to change the formatting
options.

Refs redhat-developer#933
@coveralls
Copy link

Coverage Status

coverage: 84.206% (+0.03%) from 84.174%
when pulling db44f9b on remcohaszing:replace-prettier
into f039273 on redhat-developer:main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants