-
Notifications
You must be signed in to change notification settings - Fork 255
Closed
redhat-developer/yaml-language-server
#1191Description
Is your enhancement related to a problem? Please describe.
After updating redhat.vscode-yaml to 1.20.0, I can now use the YAML formatter on Ansible files (ansible / ansible-jinja), which is great.
However, formatting on save removes the explicit YAML document end marker (...).
In my team, this marker is required by convention, so we need to keep it when present.
Describe the solution you would like
Please add a formatter setting to preserve YAML document markers, especially the document end marker (...) when it is already present.
Example idea:
yaml.format.preserveDocumentEndMarker: true(or similar)
This would let users keep the formatter enabled for Ansible files without losing required document markers.
Describe alternatives you have considered
- Disabling format on save for Ansible: avoids marker removal, but we lose formatter benefits.
- Disabling YAML formatter completely: same issue, too broad.
- Pinning older extension versions: not ideal long-term.
Additional context
- This behavior changed for my workflow between
1.19.1and1.20.0. - I believe this is related to formatter support for
ansibleandansible-jinjaadded in 1.20.0. - Old related request: Format with document start
---and document end.... #322
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done