Skip to content

Support resolving formatter settings per document - #1350

Merged
datho7561 merged 1 commit into
redhat-developer:mainfrom
shin19991207:fix-formatter-scope
Oct 1, 2026
Merged

datho7561 merged 1 commit into
redhat-developer:mainfrom
shin19991207:fix-formatter-scope

Conversation

@shin19991207

Copy link
Copy Markdown
Member

What does this PR do?

Supports resolving formatter settings per document.
This allows different folders in a multi-root workspace to use different formatter settings, including singleQuote, bracketSpacing, proseWrap, printWidth, and trailingComma.

What issues does this PR fix or reference?

Fixes redhat-developer/vscode-yaml#1240
Related to redhat-developer/vscode-yaml#1287

Is it tested? How?

  • New automated test by Claude
  • Manually tested with Make formatter settings resource scoped vscode-yaml#1287 in a multi-root workspace with different formatter settings for each workspace folder:
    1. Create a multi-root workspace containing two folders
    2. In the first folder's .vscode/settings.json, configure:
      {
        "yaml.format.singleQuote": true
      }
    3. In the second folder's .vscode/settings.json, configure:
      {
        "yaml.format.singleQuote": false
      }
    4. Create the same YAML document in both folders:
      root:
        - child: "text"
    5. Run Format Document in both files.

Signed-off-by: Morgan Chang <shin19991207@gmail.com>

@datho7561 datho7561 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and works well. Thanks, Morgan!

@datho7561
datho7561 merged commit 854f1ad into redhat-developer:main Oct 1, 2026
7 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change yaml.format.singleQuote setting scope from window to resource

2 participants