redhat-developer / redhat-developer/vscode-yaml
Default formatter not being set
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 829
- Forks
- 260
- Avg merge
- 5h 43m
- Merged PRs (30d)
- 1
Description
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
Steps to Reproduce
- Install both the Prettier and YAML extension
- 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
- Attempt to set the default formatter to YAML and observe the change the
settings.json
Environment
- Windows
- Mac
- Linux
- other (please specify)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the warning in a new .yaml file with the Prettier and Red Hat YAML extensions installed, then inspect how the [yaml] editor.defaultFormatter setting is read and reflected in the editor. Done means selecting a formatter updates settings.json and the editor no longer reports that YAML has no configured default formatter.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100