{ "name": "openhab", "displayName": "openHAB", "description": "Robust tool for openHAB textual configurations. Includes code snippets, syntax highlighting, language server integration and more.", "version": "0.4.1", "publisher": "openhab", "icon": "openhab.png", "repository": { "type": "git", "url": "https://github.com/openhab/openhab-vscode.git" }, "license": "SEE LICENSE IN LICENSE", "engines": { "vscode": "^1.30.0" }, "categories": [ "Programming Languages", "Snippets", "Other" ], "activationEvents": [ "onCommand:openhab.searchCommunity", "onCommand:openhab.openKaraf", "onCommand:openhab.basicUI", "onCommand:openhab.command.refreshEntry", "onCommand:openhab.command.showInPaperUI", "onCommand:openhab.command.copyName", "onCommand:openhab.command.items.copyState", "onCommand:openhab.command.items.addRule", "onCommand:openhab.command.items.addToSitemap", "onCommand:openhab.command.things.docs", "onCommand:openhab.command.things.copyUID", "onCommand:openhab.command.things.addItems", "onLanguage:openhab" ], "main": "./client/out/extension", "contributes": { "menus": { "editor/title": [ { "when": "resourceLangId == openhab", "command": "openhab.basicUI", "group": "navigation" } ], "view/title": [ { "command": "openhab.command.refreshEntry", "when": "view == openhabItems", "group": "navigation" }, { "command": "openhab.command.refreshEntry", "when": "view == openhabThings", "group": "navigation" } ], "view/item/context": [ { "command": "openhab.command.showInPaperUI", "when": "view == openhabItems" }, { "command": "openhab.command.showInPaperUI", "when": "view == openhabThings && viewItem == thing" }, { "command": "openhab.command.copyName", "when": "view == openhabItems" }, { "command": "openhab.command.copyName", "when": "view == openhabThings" }, { "command": "openhab.command.items.copyState", "when": "view == openhabItems && viewItem != statelessItem && viewItem != statelessGroup" }, { "command": "openhab.command.items.addToSitemap", "when": "view == openhabItems" }, { "command": "openhab.command.things.addItems", "when": "view == openhabThings" }, { "command": "openhab.command.items.addRule", "when": "view == openhabItems" }, { "command": "openhab.command.things.copyUID", "when": "view == openhabThings" }, { "command": "openhab.command.things.docs", "when": "view == openhabThings && viewItem == thing" } ] }, "keybindings": [ { "when": "resourceLangId == openhab", "command": "openhab.basicUI", "key": "ctrl+alt+o", "mac": "cmd+alt+o" } ], "commands": [ { "command": "openhab.searchCommunity", "title": "openHAB: Search in Community Forum" }, { "command": "openhab.openKaraf", "title": "openHAB: Open Karaf console" }, { "command": "openhab.command.showInPaperUI", "title": "Show in Paper UI" }, { "command": "openhab.command.items.addRule", "title": "Create a Rule" }, { "command": "openhab.command.items.addToSitemap", "title": "Insert into Sitemap" }, { "command": "openhab.command.copyName", "title": "Copy Name" }, { "command": "openhab.command.items.copyState", "title": "Copy State" }, { "command": "openhab.command.things.copyUID", "title": "Copy UID" }, { "command": "openhab.command.things.addItems", "title": "Create Items from Channels" }, { "command": "openhab.command.things.docs", "title": "Binding documentation" }, { "command": "openhab.command.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 things tree view 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": [ "number", "null" ], "default": 8080, "description": "Specifies the port for the openHAB preview." }, "openhab.remoteLspPort": { "type": [ "number", "null" ], "default": 5007, "description": "Specifies the port where openHAB is running its Language Server." }, "openhab.remoteLspEnabled": { "type": [ "boolean" ], "default": true, "description": "Enables communication with Language Server of openHAB instance." }, "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" }, "openhab.paperPath": { "type": [ "string" ], "default": "paperui", "description": "(optional) If you're using openHAB2 build from before 9th Jan 2017, change this parameter to 'ui'" }, "openhab.karafCommand": { "type": [ "string" ], "default": "ssh openhab@%openhabhost% -p 8101", "description": "Directly log into openHAB Karaf console. Note that this option is available only if you exposed Karaf console." }, "openhab.sitemapPreviewUI": { "type": [ "string" ], "default": "basicui", "description": "(optional) Choose between `basicui` and `classicui` for the sitemap preview panel" }, "openhab.itemCasing": { "type": "string", "default": "camel", "enum": [ "camel", "snake" ], "markdownDescription": "Choose how the `Create Items from Channels` command generates Item names. Use `camel` for `CamelCase` or `snake` for `Upper_Snake_Case`." } } }, "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" } ], "viewsContainers": { "activitybar": [ { "id": "openhab", "title": "openHAB", "icon": "images/oh.svg" } ] }, "views": { "openhab": [ { "id": "openhabItems", "name": "Items", "when": "resourceLangId == openhab" }, { "id": "openhabThings", "name": "Things", "when": "resourceLangId == openhab" } ] }, "snippets": [ { "language": "openhab", "path": "./snippets/openhab.json" }, { "language": "openhab", "path": "./snippets/openhab_items.json" }, { "language": "openhab", "path": "./snippets/openhab_rules.json" }, { "language": "openhab", "path": "./snippets/openhab_rules_designpattern.json" }, { "language": "openhab", "path": "./snippets/openhab_rules_typeconversions.json" }, { "language": "openhab", "path": "./snippets/openhab_sitemaps.json" } ], "iconThemes": [ { "id": "openhab", "label": "openHAB", "path": "./fileicons/openhab-icon-theme.json" } ] }, "scripts": { "compile": "tsc -b", "watch": "tsc -b -w", "postinstall": "cd client && npm install && cd ../serverJS && npm install && cd ..", "test": "cd client && npm test && cd ../serverJS && npm test && cd ..", "clean": "rm -rf node_modules && rm -rf **/node_modules && rm -rf **/out", "pruneProduction": "npm prune --production && cd client && npm prune --production && cd ../serverJS && npm prune --production && cd ..", "build": "npm run clean && npm install && npm run compile && npm run test && npm run pruneProduction", "package": "npm run build && vsce package", "publish": "npm run build && vsce publish" }, "devDependencies": { "@types/form-data": "^2.2.1", "@types/lodash": "^4.14.119", "@types/node": "^8.10.0", "@types/request": "^2.48.1", "@types/request-promise-native": "^1.0.15", "jest": "^23.6.0", "request-promise-native": "^1.0.5", "typescript": "^3.2.2" } }