diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..8384213 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,13 @@ +// A launch configuration that launches the extension inside a new window +{ + "version": "0.1.0", + "configurations": [ + { + "name": "Launch Extension", + "type": "extensionHost", + "request": "launch", + "runtimeExecutable": "${execPath}", + "args": ["--extensionDevelopmentPath=${workspaceRoot}" ] + } + ] +} \ No newline at end of file diff --git a/language-configuration.json b/language-configuration.json new file mode 100644 index 0000000..370e5be --- /dev/null +++ b/language-configuration.json @@ -0,0 +1,24 @@ +{ + "comments": { + "lineComment": "#" + }, + "brackets": [ + ["{", "}"], + ["[", "]"], + ["(", ")"] + ], + "autoClosingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["\"", "\""], + ["'", "'"] + ], + "surroundingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["\"", "\""], + ["'", "'"] + ] +} \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..aa0c9f1 --- /dev/null +++ b/package.json @@ -0,0 +1,34 @@ +{ + "name": "azurecli", + "displayName": "Azure CLI", + "description": "Azure CLI Tools", + "version": "0.0.1", + "publisher": "vscode", + "engines": { + "vscode": "^1.10.0" + }, + "categories": [ + "Languages" + ], + "contributes": { + "languages": [{ + "id": "sha", + "aliases": ["Bash Azure Scrapbook", "sha"], + "extensions": [".sha"], + "configuration": "./language-configuration.json" + }], + "grammars": [{ + "language": "sha", + "scopeName": "source.sha", + "path": "./syntaxes/sha.tmLanguage.json" + }], + "keybindings":[ + { + "command": "workbench.action.terminal.runSelectedText", + "key": "ctrl+'", + "mac": "cmd+'", + "when": "editorTextFocus" + } + ] + } +} \ No newline at end of file diff --git a/syntaxes/sha.tmLanguage.json b/syntaxes/sha.tmLanguage.json new file mode 100644 index 0000000..1c8efc8 --- /dev/null +++ b/syntaxes/sha.tmLanguage.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "name": "Bash Azure Scrapbook", + "patterns": [ + { + "include": "#keywords" + }, + { + "include": "#identifiers" + }, + { + "include": "#strings" + } + ], + "repository": { + "keywords": { + "patterns": [{ + "name": "keyword.control.sha", + "match": "\\b(az|acs|cloud|disk|group|lock|policy|role|tag|ad|component|documentdb|image|login|provider|snapshot|vm|appservice|configure|feature|iot|logout|redis|sql|vmss|account|batch|container|feedback|keyvault|network|resource|storage)\\b" + }] + }, + "identifiers": { + "patterns": [{ + "name": "variable.other.sha", + "match": "\\s--?[[:alnum:]]+\\s" + }] + }, + "strings": { + "name": "string.quoted.double.sha", + "begin": "\"", + "end": "\"", + "patterns": [ + { + "name": "constant.character.escape.sha", + "match": "\\\\." + } + ] + } + }, + "scopeName": "source.sha" +} \ No newline at end of file