220 lines
7.3 KiB
JSON
220 lines
7.3 KiB
JSON
{
|
|
"name": "openhab",
|
|
"displayName": "openHAB",
|
|
"description": "openHAB syntax highlight, code snippets, integrated Basic UI preview and docs search",
|
|
"version": "0.1.0",
|
|
"publisher": "openhab",
|
|
"icon": "openhab.png",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/openhab/openhab-vscode.git"
|
|
},
|
|
"license": "SEE LICENSE IN LICENSE",
|
|
"engines": {
|
|
"vscode": "^1.13.0"
|
|
},
|
|
"categories": [
|
|
"Languages",
|
|
"Snippets",
|
|
"Other"
|
|
],
|
|
"activationEvents": [
|
|
"onCommand:openhab.searchDocs",
|
|
"onCommand:openhab.searchCommunity",
|
|
"onCommand:openhab.basicUI",
|
|
"onCommand:openhab.command.items.refreshEntry",
|
|
"onCommand:openhab.command.items.showInPaperUI",
|
|
"onCommand:openhab.command.items.copyName",
|
|
"onCommand:openhab.command.items.copyState",
|
|
"onCommand:openhab.command.items.addRule",
|
|
"onLanguage:openhab"
|
|
],
|
|
"main": "./out/src/extension",
|
|
"contributes": {
|
|
"menus": {
|
|
"editor/title": [{
|
|
"when": "resourceLangId == openhab",
|
|
"command": "openhab.basicUI",
|
|
"group": "navigation"
|
|
}],
|
|
"view/title": [{
|
|
"command": "openhab.command.items.refreshEntry",
|
|
"when": "view == openhabItems",
|
|
"group": "navigation"
|
|
}],
|
|
"view/item/context": [{
|
|
"command": "openhab.command.items.showInPaperUI",
|
|
"when": "view == openhabItems"
|
|
},
|
|
{
|
|
"command": "openhab.command.items.copyName",
|
|
"when": "view == openhabItems"
|
|
},
|
|
{
|
|
"command": "openhab.command.items.copyState",
|
|
"when": "view == openhabItems && viewItem != statelessItem && viewItem != statelessGroup"
|
|
},
|
|
{
|
|
"command": "openhab.command.items.addRule",
|
|
"when": "view == openhabItems"
|
|
}
|
|
]
|
|
},
|
|
"keybindings": [{
|
|
"when": "resourceLangId == openhab",
|
|
"command": "openhab.basicUI",
|
|
"key": "ctrl+alt+o",
|
|
"mac": "cmd+alt+o"
|
|
},
|
|
{
|
|
"when": "resourceLangId == openhab",
|
|
"command": "openhab.searchDocs",
|
|
"key": "shift+alt+o"
|
|
}
|
|
],
|
|
"commands": [{
|
|
"command": "openhab.searchDocs",
|
|
"title": "openHAB: Search in Docs"
|
|
},
|
|
{
|
|
"command": "openhab.searchCommunity",
|
|
"title": "openHAB: Search in Community Forum"
|
|
},
|
|
{
|
|
"command": "openhab.command.items.showInPaperUI",
|
|
"title": "Show in Paper UI"
|
|
},
|
|
{
|
|
"command": "openhab.command.items.addRule",
|
|
"title": "Create a Rule"
|
|
},
|
|
{
|
|
"command": "openhab.command.items.copyName",
|
|
"title": "Copy Name"
|
|
},
|
|
{
|
|
"command": "openhab.command.items.copyState",
|
|
"title": "Copy State"
|
|
},
|
|
{
|
|
"command": "openhab.command.items.refreshEntry",
|
|
"title": "Refresh",
|
|
"icon": {
|
|
"light": "resources/light/refresh.svg",
|
|
"dark": "resources/dark/refresh.svg"
|
|
}
|
|
},
|
|
{
|
|
"command": "openhab.basicUI",
|
|
"title": "openHAB: Open Basic UI",
|
|
"icon": {
|
|
"light": "./images/oh_color.svg",
|
|
"dark": "./images/oh.svg"
|
|
}
|
|
}
|
|
],
|
|
"configuration": {
|
|
"type": "object",
|
|
"title": "openHAB Configuration",
|
|
"properties": {
|
|
"openhab.useRestApi": {
|
|
"type": "boolean",
|
|
"default": true,
|
|
"description": "Connects to openHAB REST API if set to true. If not, Items tree view and code completions are disabled."
|
|
},
|
|
"openhab.host": {
|
|
"type": [
|
|
"string"
|
|
],
|
|
"default": "openhabianpi",
|
|
"description": "Specifies the URL or IP address for the openHAB preview. (Use 'localhost' when developing locally)"
|
|
},
|
|
"openhab.port": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"default": "8080",
|
|
"description": "Specifies the port for the openHAB preview."
|
|
},
|
|
"openhab.username": {
|
|
"type": [
|
|
"string"
|
|
],
|
|
"default": "",
|
|
"description": "(optional) Specifies the Basic Auth username for accessing the openHAB preview/REST API"
|
|
},
|
|
"openhab.password": {
|
|
"type": [
|
|
"string"
|
|
],
|
|
"default": "",
|
|
"description": "(optional) Specifies the Basic Auth password for accessing the openHAB preview/REST API"
|
|
}
|
|
}
|
|
},
|
|
"languages": [{
|
|
"id": "openhab",
|
|
"aliases": [
|
|
"openHAB"
|
|
],
|
|
"extensions": [
|
|
".rules",
|
|
".script",
|
|
".items",
|
|
".sitemap",
|
|
".things",
|
|
".persist"
|
|
],
|
|
"configuration": "./language-configuration.json"
|
|
}],
|
|
"grammars": [{
|
|
"language": "openhab",
|
|
"scopeName": "source.openhab",
|
|
"path": "./syntaxes/openhab.tmLanguage.json"
|
|
}],
|
|
"views": {
|
|
"explorer": [{
|
|
"id": "openhabItems",
|
|
"name": "openHAB Items",
|
|
"when": "resourceLangId == openhab && config.openhab.useRestApi"
|
|
}]
|
|
},
|
|
"snippets": [{
|
|
"language": "openhab",
|
|
"path": "./snippets/openhabrules.json"
|
|
},
|
|
{
|
|
"language": "openhab",
|
|
"path": "./snippets/openhab.json"
|
|
}
|
|
],
|
|
"iconThemes": [{
|
|
"id": "openhab",
|
|
"label": "openHAB",
|
|
"path": "./fileicons/openhab-icon-theme.json"
|
|
}]
|
|
},
|
|
"scripts": {
|
|
"vscode:prepublish": "tsc -p ./",
|
|
"compile": "tsc -watch -p ./",
|
|
"postinstall": "node ./node_modules/vscode/bin/install",
|
|
"test": "node ./node_modules/vscode/bin/test"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^6.0.40",
|
|
"@types/mocha": "^2.2.32",
|
|
"typescript": "^2.0.3",
|
|
"vscode": "^1.0.0",
|
|
"mocha": "^2.3.3"
|
|
},
|
|
"dependencies": {
|
|
"@types/lodash": "^4.14.58",
|
|
"@types/request-promise-native": "^1.0.5",
|
|
"copy-paste": "^1.3.0",
|
|
"lodash": "^4.17.4",
|
|
"request": "^2.81.0",
|
|
"request-promise-native": "^1.0.4"
|
|
}
|
|
}
|