Skip to content

Use yaml package for formatting#1222

Merged
datho7561 merged 1 commit intoredhat-developer:mainfrom
datho7561:replace-prettier
Mar 27, 2026
Merged

Use yaml package for formatting#1222
datho7561 merged 1 commit intoredhat-developer:mainfrom
datho7561:replace-prettier

Conversation

@datho7561
Copy link
Copy Markdown
Contributor

What does this PR do?

Rebases #983

Original text from that issue:

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 , Rebases #983

Is it tested? How?

Existing tests

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
Copy link
Copy Markdown
Member

@shin19991207 shin19991207 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks, David!

@datho7561
Copy link
Copy Markdown
Contributor Author

Thanks for the review!

@datho7561 datho7561 merged commit 22d01b4 into redhat-developer:main Mar 27, 2026
4 checks passed
@datho7561 datho7561 deleted the replace-prettier branch March 27, 2026 20:13
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.

3 participants