Stefan Stranger
Stefan Stranger

Reputation: 150

Custom Extension setting shows as unknown configuration

I created a custom VSCode extension which needs a configuration setting the user settings file of vscode.

Why does the setting shows as unknown configuration? It works as expected.

enter image description here

Upvotes: 2

Views: 4503

Answers (1)

alefragnani
alefragnani

Reputation: 3313

I looked at your repo and noted that there is an error in your package.json file. The keybindings and configuration nodes must be inside contributes, like this (I removed keybindings since it is empty):

"contributes": {
    "commands": [
        {
            "command": "extension.postMessage",
            "title": "Microsoft Teams: Post Message"
        },
        {
            "command": "extension.postCurrentFile",
            "title": "Microsoft Teams: Post Current File"
        }
    ],
    "configuration": {
        "type": "object",
        "title": "Visual Studio Code Microsoft Teams configuration",
        "properties": {
            "microsoftteams.teamswebhook": {
                "type": "string",
                "default": "",
                "description": "Microsoft Teams Webhook"
            }
        }
    }
},

I made a pull request fixing this issue.

Upvotes: 5

Related Questions