Skip to content

Settings UI shows undefined for default values in nested configuration keys #311928

@n-gist

Description

@n-gist

In my extension I group settings like:

  • focus.behavior.folders
  • focus.behavior.folders.external
  • focus.behavior.folders.explore

Where:

  • folders → default folder behavior
  • folders.external → behavior for external folders
  • folders.explore → behavior for explored folders

This works correctly in settings.json IntelliSense, but in Settings UI and runtime extended entries reads as undefined instead of the configured default value.

Reproduction

  "contributes": {
    "configuration": [
      {
        "title": "Repro",
        "properties": {
          "repro.test": {
            "type": "string",
            "enum": ["a", "b"],
            "default": "b",
            "description": "Works correctly"
          },
          "repro.test.extra": {
            "type": "string",
            "enum": ["a", "b"],
            "default": "b",
            "description": "Works in settings.json IntelliSense but shows undefined in UI"
          }
        }
      }
    ]  
  }

Works in settings.json:

Image

Issue in Settings UI:

Image

Repo:

git clone https://github.com/n-gist/vscode.settings-ui-undefined-repro.git

Expected

Settings UI should display the correct default value.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions