vscode-yaml icon indicating copy to clipboard operation
vscode-yaml copied to clipboard

Default formatter not being set

Open mxcury opened this issue 1 year ago • 1 comments

Describe the bug

I have installed the Prettier for formatting my html, css, ... but I would like to use the Redhat YAML extension for formatting .yaml files however, when I attempt to select this extension as the default formatter I still get a warning that there is no default formatter for .yaml files.

It makes the change in the settings.json but it is not reflected in the editor window itself.

	"[yaml]": {
		"editor.defaultFormatter": "esbenp.prettier-vscode"
	},

-->

Expected Behavior

It should display in the editor window that there is a configured default formatter for .yaml files

Current Behavior

I receive the warning in the status bar that: "There are multiple formatters for 'YAML' file. One of them should be configured as the default formatter Screenshot 2024-07-13 at 12 22 05

Steps to Reproduce

  1. Install both the Prettier and YAML extension
  2. Create a new .yaml file in an empty directory, containing the following schema
name: John Doe
age: 30
is_student: false
courses:
- Mathematics
  - Physics
  - Computer Science
address:
  street: 123 Main St
  city: Anytown
  state: CA
  postal_code: 12345
  1. Attempt to set the default formatter to YAML and observe the change the settings.json

Environment

  • [ ] Windows
  • [X] Mac
  • [ ] Linux
  • [ ] other (please specify)

mxcury avatar Jul 13 '24 11:07 mxcury