You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a compatible issue with the YAML extension. We have default formatting set up in our extension, and we do not want to rely on the YAML extension to do it.
Having said that, you can always set up a default extension for ansible language and point it to the YAML extension or prettier.prettier seems to work well with the ansible language. If the YAML extension is not formatting it, you might have to raise an issue with their extension to support formatting for ansible language.
Here's how you can set up the formator. Add these to your settings configuration:
Yes! I am running the same code in my editor settings but doesn't work. VS-Code underlines "editor.defaultFormatter": "redhat.vscode-yaml" in yellow and say, Value is not accepted.
Neither the default Ansible Extension seems be supporting document format as it doesn't add formatting command to VS-Code.
I will raise a new issue specific to Ansible Extension for sure!
Problem
No formatter support on ansible playbooks in VS-Code.
Solution
Add formatter support to ansible's extension.
Alternatives
Tweak ansible extension to use YAML extension as default formatter.
Additional context
No response
The text was updated successfully, but these errors were encountered: