redhat-developer / redhat-developer/vscode-yaml
Change yaml.format.singleQuote setting scope from window to resource
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 829
- Forks
- 260
- Avg merge
- 5h 43m
- Merged PRs (30d)
- 1
Description
The yaml.format.singleQuote setting is currently defined with "scope": "window", which prevents it from being applied per-folder in multi-root workspaces or in a folder-level settings file.
Problem
Teams working in multi-root workspaces often have different YAML formatting conventions per repository. For example, one repo may require single quotes in pipeline YAML while another uses double quotes. Because yaml.format.singleQuote is window-scoped, there's no way to configure this per-folder — it can only be set globally at the user or workspace level.
When a folder-level VS Code settings file includes "yaml.format.singleQuote": true, VS Code displays the warning:
"This setting cannot be applied in this workspace. It will be applied when you open the containing workspace folder directly."
Expected behavior
yaml.format.singleQuote should use "scope": "resource" so it can be configured per-folder, consistent with how other formatting preferences like editor.tabSize and editor.insertSpaces work.
Proposed fix
In the extension's package.json configuration contribution, change the scope for yaml.format.singleQuote from "window" to "resource".
This may also apply to other yaml.format.* settings (yaml.format.bracketSpacing, yaml.format.proseWrap, yaml.format.printWidth, yaml.format.enable) — all format preferences are inherently per-file/per-folder concerns and would benefit from resource scope.
Related
- #927 (broader multi-root workspace configuration support)
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
Open package.json and locate the yaml.format.singleQuote configuration contribution. Change its scope to resource, then inspect the neighboring yaml.format.* settings to determine whether the requested scope change applies to them too. Verify the extension configuration accepts folder-level settings and that the documented behavior matches the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100