mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-04-27 16:55:44 +08:00
174 lines
4.3 KiB
JSON
174 lines
4.3 KiB
JSON
{
|
|
"name": "configuration-sample",
|
|
"displayName": "Configuration Sample",
|
|
"description": "How to contribute and use configurations in VS Code",
|
|
"version": "0.0.1",
|
|
"publisher": "vscode-samples",
|
|
"private": true,
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/Microsoft/vscode-extension-samples"
|
|
},
|
|
"engines": {
|
|
"vscode": "^1.32.0"
|
|
},
|
|
"categories": [
|
|
"Other"
|
|
],
|
|
"activationEvents": [
|
|
"onCommand:config.commands.configureViewOnWindowOpen",
|
|
"onCommand:config.commands.configureEmptyLastLineCurrentFile",
|
|
"onCommand:config.commands.configureEmptyLastLineFiles"
|
|
],
|
|
"main": "./out/extension",
|
|
"keywords": [
|
|
"multi-root ready"
|
|
],
|
|
"contributes": {
|
|
"configuration": [
|
|
{
|
|
"id": "widgetSamples",
|
|
"title": "Settings Editor Widget Samples",
|
|
"order": 2,
|
|
"properties": {
|
|
"conf.settingsEditor.numericObjectSetting": {
|
|
"type": "object",
|
|
"order": 2,
|
|
"description": "An example numeric object setting.",
|
|
"properties": {
|
|
"intprop": {
|
|
"type": "integer",
|
|
"description": "Integer property"
|
|
},
|
|
"numprop": {
|
|
"type": "number",
|
|
"description": "Numeric property"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"conf.settingsEditor.boolObjectSetting": {
|
|
"type": "object",
|
|
"order": 1,
|
|
"description": "An example bool object setting.",
|
|
"properties": {
|
|
"prop1": {
|
|
"type": "boolean",
|
|
"description": "Property 1"
|
|
},
|
|
"prop2": {
|
|
"type": "boolean",
|
|
"description": "Property 2"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"default": {
|
|
"prop1": true,
|
|
"prop2": false
|
|
}
|
|
},
|
|
"conf.settingsEditor.uniqueEnumArraySetting": {
|
|
"type": "array",
|
|
"description": "An example enum array setting.",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": [
|
|
"red",
|
|
"yellow",
|
|
"blue"
|
|
]
|
|
},
|
|
"uniqueItems": true
|
|
},
|
|
"conf.settingsEditor.multilineSetting": {
|
|
"type": "string",
|
|
"description": "An example multiline setting.",
|
|
"editPresentation": "multilineText"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "configurationSamples",
|
|
"title": "Configuration Sample",
|
|
"properties": {
|
|
"conf.view.showOnWindowOpen": {
|
|
"type": "string",
|
|
"enum": [
|
|
"explorer",
|
|
"search",
|
|
"scm",
|
|
"debug",
|
|
"extensions"
|
|
],
|
|
"default": "explorer",
|
|
"description": "Window configuration: View to show always when a window opens",
|
|
"scope": "window"
|
|
},
|
|
"conf.resource.insertEmptyLastLine": {
|
|
"type": "object",
|
|
"default": {},
|
|
"description": "Resource configuration: Configure files using glob patterns to have an empty last line always",
|
|
"scope": "resource"
|
|
},
|
|
"conf.language.showSize": {
|
|
"type": "boolean",
|
|
"default": false,
|
|
"description": "Shows the size of the document",
|
|
"scope": "language-overridable"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "anotherCategory",
|
|
"title": "Misc Category",
|
|
"order": 1,
|
|
"properties": {
|
|
"conf.settingsEditor.firstMisc": {
|
|
"type": "string"
|
|
},
|
|
"conf.settingsEditor.secondMisc": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"commands": [
|
|
{
|
|
"category": "Configuration Sample",
|
|
"command": "config.commands.configureViewOnWindowOpen",
|
|
"title": "Configure view to show on window open"
|
|
},
|
|
{
|
|
"category": "Configuration Sample",
|
|
"command": "config.commands.configureEmptyLastLineCurrentFile",
|
|
"title": "Configure empty last line for current file"
|
|
},
|
|
{
|
|
"category": "Configuration Sample",
|
|
"command": "config.commands.configureEmptyLastLineFiles",
|
|
"title": "Configure empty last line for files"
|
|
},
|
|
{
|
|
"category": "Configuration Sample",
|
|
"command": "config.commands.overrideLanguageValue",
|
|
"title": "Configure show size for language"
|
|
}
|
|
]
|
|
},
|
|
"scripts": {
|
|
"vscode:prepublish": "npm run compile",
|
|
"compile": "tsc -p ./",
|
|
"lint": "eslint . --ext .ts,.tsx",
|
|
"watch": "tsc -watch -p ./"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^12.12.0",
|
|
"@types/vscode": "^1.40.0",
|
|
"@typescript-eslint/eslint-plugin": "^5.19.0",
|
|
"@typescript-eslint/parser": "^5.19.0",
|
|
"eslint": "^8.13.0",
|
|
"typescript": "^4.7.2"
|
|
}
|
|
}
|