diff --git a/vscode-extensions/vscode-boot-properties/lib/Main.ts b/vscode-extensions/vscode-boot-properties/lib/Main.ts index 4440809a0..057525dc0 100644 --- a/vscode-extensions/vscode-boot-properties/lib/Main.ts +++ b/vscode-extensions/vscode-boot-properties/lib/Main.ts @@ -12,6 +12,9 @@ import {TextDocument} from 'vscode'; import * as commons from 'commons-vscode'; +const PROPERTIES_LANGUAGE_ID = "spring-boot-properties"; +const YAML_LANGUAGE_ID = "spring-boot-properties-yaml"; + /** Called when extension is activated */ export function activate(context: VSCode.ExtensionContext) { let options : commons.ActivatorOptions = { @@ -19,25 +22,10 @@ export function activate(context: VSCode.ExtensionContext) { CONNECT_TO_LS: false, extensionId: 'vscode-boot-properties', launcher: (context: VSCode.ExtensionContext) => Path.resolve(context.extensionPath, 'jars/language-server.jar'), + jvmHeap: "64m", clientOptions: { - // HACK!!! documentSelector only takes string|string[] where string is language id, but DocumentFilter object is passed instead - // Reasons: - // 1. documentSelector is just passed over to functions like #registerHoverProvider(documentSelector, ...) that take documentSelector - // parameter in string | DocumentFilter | string[] | DocumentFilter[] format - // 2. Combination of non string|string[] documentSelector parameter and synchronize.textDocumentFilter function makes doc synchronization - // events pass on to Language Server only for documents for which function passed via textDocumentFilter property return true - - // TODO: Remove cast ones https://github.com/Microsoft/vscode-languageserver-node/issues/9 is resolved - documentSelector: [ - // for application.properties files - {language: 'ini', pattern: '**/application*.properties'}, - {language: 'java-properties', pattern: '**/application*.properties'}, - {language: 'properties', pattern: '**/application*.properties'}, - // for application.yml files - {language: 'yaml', pattern: '**/application*.yml'} - - ] + documentSelector: [ PROPERTIES_LANGUAGE_ID, YAML_LANGUAGE_ID ] } }; - commons.activate(options, context); + let clientPromise = commons.activate(options, context); } diff --git a/vscode-extensions/vscode-boot-properties/package.json b/vscode-extensions/vscode-boot-properties/package.json index 74668adf2..c206f81eb 100644 --- a/vscode-extensions/vscode-boot-properties/package.json +++ b/vscode-extensions/vscode-boot-properties/package.json @@ -25,11 +25,45 @@ "application-yaml" ], "activationEvents": [ - "onLanguage:ini", - "onLanguage:java-properties", - "onLanguage:properties", - "onLanguage:yaml" + "onLanguage:spring-boot-properties", + "onLanguage:spring-boot-properties-yaml" ], + "contributes": { + "languages": [ + { + "id": "spring-boot-properties-yaml", + "aliases": [ + "Spring Boot Properties Yaml" + ], + "filenamePatterns": [ + "application*.yml" + ], + "configuration": "./yaml-support/language-configuration.json" + }, + { + "id": "spring-boot-properties", + "aliases": [ + "Spring Boot Properties" + ], + "filenamePatterns": [ + "application*.properties" + ], + "configuration": "./properties-support/language-configuration.json" + } + ], + "grammars": [ + { + "language": "spring-boot-properties-yaml", + "scopeName": "source.yaml", + "path": "./yaml-support/yaml.tmLanguage" + }, + { + "language": "spring-boot-properties", + "scopeName": "source.java-properties", + "path": "./properties-support/java-properties.tmLanguage" + } + ] + }, "main": "./out/lib/Main", "scripts": { "prepublish": "tsc -p .", diff --git a/vscode-extensions/vscode-boot-properties/properties-support/OSSREADME.json b/vscode-extensions/vscode-boot-properties/properties-support/OSSREADME.json new file mode 100644 index 000000000..c1ebef0ea --- /dev/null +++ b/vscode-extensions/vscode-boot-properties/properties-support/OSSREADME.json @@ -0,0 +1,13 @@ +// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS: + +[{ + "name": "textmate/java.tmbundle", + "version": "0.0.0", + "repositoryURL": "https://github.com/textmate/java.tmbundle/blob/master/Syntaxes/JavaProperties.plist", + "licenseDetail": [ + "Permission to copy, use, modify, sell and distribute this", + "software is granted. This software is provided \"as is\" without", + "express or implied warranty, and with no claim as to its", + "suitability for any purpose." + ] +}] diff --git a/vscode-extensions/vscode-boot-properties/properties-support/java-properties.tmLanguage b/vscode-extensions/vscode-boot-properties/properties-support/java-properties.tmLanguage new file mode 100644 index 000000000..bf25ce875 --- /dev/null +++ b/vscode-extensions/vscode-boot-properties/properties-support/java-properties.tmLanguage @@ -0,0 +1,160 @@ + + + + + fileTypes + + properties + + foldingStartMarker + ^[a-zA-Z0-9.-_]+=.*\ + + foldingStopMarker + ^(.*(?<!\) +) + keyEquivalent + ^~J + name + Java Properties + patterns + + + comment + Ignore blank lines + match + ^\s*$ + + + include + #comment-line + + + include + #property-name + + + include + #property-definition + + + repository + + comment-line + + captures + + 1 + + name + punctuation.whitespace.comment.leading.java-properties + + 2 + + name + punctuation.definition.comment.java-properties + + + match + ^(\s*)([#!])(.+)?$\n? + name + comment.line.java-properties + + property-definition + + begin + ^(\s*)((?:\\[ \t]|\\:|\\=|[^:=\s])+)(?:\s*([:=]))?\s* + beginCaptures + + 1 + + name + punctuation.whitespace.leading.java-properties + + 2 + + name + support.constant.java-properties + patterns + + + match + \\(?:[ \t:=\\ntfr\"']|u[0-9A-Fa-f]{4}) + name + constant.character.escape.java-properties + + + + 3 + + name + punctuation.separator.key-value.java-properties + + + contentName + string.unquoted.java-properties + end + (?<!\\{1})$\n + name + meta.key-value.java-properties + patterns + + + comment + Leading space on a continued line is ignored + match + ^\s* + name + punctuation.whitespace.leading.java-properties + + + match + (\\{1})(?=$\n) + name + punctuation.separator.continuation.java-properties + + + match + \\(?:[\\ntfr\"']|u[0-9A-Fa-f]{4}) + name + constant.character.escape.java-properties + + + + property-name + + captures + + 1 + + name + punctuation.whitespace.comment.leading.java-properties + + 2 + + name + support.constant.java-properties + patterns + + + match + \\(?:[ \t:=\\ntfr\"']|u[0-9A-Fa-f]{4}) + name + constant.character.escape.java-properties + + + + + comment + A property name with no value + match + ^(\s*)((?:\\[ \t]|\\:|\\=|[^:=\s])+)(?:\s*([:=]))?\s*$\n + name + meta.key-value.java-properties + + + scopeName + source.java-properties + uuid + D364E829-7643-4AFF-948D-3C0D6B4EA8A4 + + diff --git a/vscode-extensions/vscode-boot-properties/properties-support/language-configuration.json b/vscode-extensions/vscode-boot-properties/properties-support/language-configuration.json new file mode 100644 index 000000000..053f8fee2 --- /dev/null +++ b/vscode-extensions/vscode-boot-properties/properties-support/language-configuration.json @@ -0,0 +1,21 @@ +{ + "comments": { + "lineComment": "#" + }, + "brackets": [ + ], + "autoClosingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["\"", "\""], + ["'", "'"] + ], + "surroundingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["\"", "\""], + ["'", "'"] + ] +} \ No newline at end of file diff --git a/vscode-extensions/vscode-boot-properties/scripts/preinstall.sh b/vscode-extensions/vscode-boot-properties/scripts/preinstall.sh index 9aa0e10f9..5389dc036 100755 --- a/vscode-extensions/vscode-boot-properties/scripts/preinstall.sh +++ b/vscode-extensions/vscode-boot-properties/scripts/preinstall.sh @@ -7,6 +7,10 @@ workdir=`pwd` (cd ../commons-vscode ; npm install) npm install ../commons-vscode +# Copy grammar files for .properties and .yml format +curl https://raw.githubusercontent.com/textmate/yaml.tmbundle/master/Syntaxes/YAML.tmLanguage > yaml-support/yaml.tmLanguage +curl https://raw.githubusercontent.com/textmate/java.tmbundle/master/Syntaxes/JavaProperties.plist > properties-support/java-properties.tmLanguage + # Use maven to build fat jar of the language server cd ../../headless-services/boot-properties-language-server ./build.sh diff --git a/vscode-extensions/vscode-boot-properties/yaml-support/OSSREADME.json b/vscode-extensions/vscode-boot-properties/yaml-support/OSSREADME.json new file mode 100644 index 000000000..bcdae2a4c --- /dev/null +++ b/vscode-extensions/vscode-boot-properties/yaml-support/OSSREADME.json @@ -0,0 +1,28 @@ +// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS: + +[{ + "name": "textmate/yaml.tmbundle", + "version": "0.0.0", + "license": "TextMate Bundle License", + "repositoryURL": "https://github.com/textmate/yaml.tmbundle", + "licenseDetail": [ + "Copyright (c) 2015 FichteFoll ", + "", + "Permission is hereby granted, free of charge, to any person obtaining a copy", + "of this software and associated documentation files (the \"Software\"), to deal", + "in the Software without restriction, including without limitation the rights", + "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell", + "copies of the Software, and to permit persons to whom the Software is", + "furnished to do so, subject to the following conditions:", + "", + "The above copyright notice and this permission notice shall be included in all", + "copies or substantial portions of the Software.", + "", + "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", + "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", + "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", + "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", + "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", + "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." + ] +}] diff --git a/vscode-extensions/vscode-boot-properties/yaml-support/language-configuration.json b/vscode-extensions/vscode-boot-properties/yaml-support/language-configuration.json new file mode 100644 index 000000000..cab4f6602 --- /dev/null +++ b/vscode-extensions/vscode-boot-properties/yaml-support/language-configuration.json @@ -0,0 +1,24 @@ +{ + "comments": { + "lineComment": "#" + }, + "brackets": [ + ["{", "}"], + ["[", "]"], + ["(", ")"] + ], + "autoClosingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["\"", "\""], + ["'", "'"] + ], + "surroundingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["\"", "\""], + ["'", "'"] + ] +} \ No newline at end of file diff --git a/vscode-extensions/vscode-boot-properties/yaml-support/yaml.tmLanguage b/vscode-extensions/vscode-boot-properties/yaml-support/yaml.tmLanguage new file mode 100644 index 000000000..efc4c8ab0 --- /dev/null +++ b/vscode-extensions/vscode-boot-properties/yaml-support/yaml.tmLanguage @@ -0,0 +1,1164 @@ + + + + + fileTypes + + yaml + yml + rviz + reek + clang-format + yaml-tmlanguage + syntax + sublime-syntax + + firstLineMatch + ^%YAML( ?1.\d+)? + keyEquivalent + ^~Y + name + YAML + patterns + + + include + #comment + + + include + #property + + + include + #directive + + + match + ^--- + name + entity.other.document.begin.yaml + + + match + ^\.{3} + name + entity.other.document.end.yaml + + + include + #node + + + repository + + block-collection + + patterns + + + include + #block-sequence + + + include + #block-mapping + + + + block-mapping + + patterns + + + include + #block-pair + + + + block-node + + patterns + + + include + #prototype + + + include + #block-scalar + + + include + #block-collection + + + include + #flow-scalar-plain-out + + + include + #flow-node + + + + block-pair + + patterns + + + begin + \? + beginCaptures + + 1 + + name + punctuation.definition.key-value.begin.yaml + + + end + (?=\?)|^ *(:)|(:) + endCaptures + + 1 + + name + punctuation.separator.key-value.mapping.yaml + + 2 + + name + invalid.illegal.expected-newline.yaml + + + name + meta.block-mapping.yaml + patterns + + + include + #block-node + + + + + begin + (?x) + (?= + (?x: + [^\s[-?:,\[\]{}#&*!|>'"%@`]] + | [?:-] \S + ) + ( + [^\s:] + | : \S + | \s+ (?![#\s]) + )* + \s* + : + (\s|$) + ) + + end + (?x) + (?= + \s* $ + | \s+ \# + | \s* : (\s|$) + ) + + patterns + + + include + #flow-scalar-plain-out-implicit-type + + + begin + (?x) + [^\s[-?:,\[\]{}#&*!|>'"%@`]] + | [?:-] \S + + beginCaptures + + 0 + + name + entity.name.tag.yaml + + + contentName + entity.name.tag.yaml + end + (?x) + (?= + \s* $ + | \s+ \# + | \s* : (\s|$) + ) + + name + string.unquoted.plain.out.yaml + + + + + match + :(?=\s|$) + name + punctuation.separator.key-value.mapping.yaml + + + + block-scalar + + begin + (?:(\|)|(>))([1-9])?([-+])?(.*\n?) + beginCaptures + + 1 + + name + punctuation.definition.block.scalar.literal.yaml + + 2 + + name + punctuation.definition.block.scalar.folded.yaml + + 3 + + name + constant.numeric.indentation-indicator.yaml + + 4 + + name + support.other.chomping-indicator.yaml + + 5 + + patterns + + + include + #comment + + + match + .+ + name + invalid.illegal.expected-comment-or-newline.yaml + + + + + end + ^(?=\S)|(?!\G) + patterns + + + begin + ^([ ]+)(?! ) + end + ^(?!\1|\s*$) + name + string.unquoted.block.yaml + + + + block-sequence + + match + (-)( |\t|$) + name + punctuation.definition.block.sequence.item.yaml + + comment + + begin + (?:(^[ \t]*)|[ \t]+)(?=#\p{Print}*$) + beginCaptures + + 1 + + name + punctuation.whitespace.comment.leading.yaml + + + end + (?!\G) + patterns + + + begin + # + beginCaptures + + 0 + + name + punctuation.definition.comment.yaml + + + end + \n + name + comment.line.number-sign.yaml + + + + directive + + begin + ^% + beginCaptures + + 0 + + name + punctuation.definition.directive.begin.yaml + + + end + (?=$|[ \t]+($|#)) + name + meta.directive.yaml + patterns + + + captures + + 1 + + name + keyword.other.directive.yaml.yaml + + 2 + + name + constant.numeric.yaml-version.yaml + + + match + \G(YAML)[ \t]+(\d+\.\d+) + + + captures + + 1 + + name + keyword.other.directive.tag.yaml + + 2 + + name + storage.type.tag-handle.yaml + + 3 + + name + support.type.tag-prefix.yaml + + + match + (?x) + \G + (TAG) + (?:[ \t]+ + ((?:!(?:[0-9A-Za-z\-]*!)?)) + (?:[ \t]+ ( + ! (?x: %\p{XDigit}{2} | [0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]] )* + | (?![,!\[\]{}]) (?x: %\p{XDigit}{2} | [0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]] )+ + ) + )? + )? + + + + captures + + 1 + + name + support.other.directive.reserved.yaml + + 2 + + name + string.unquoted.directive-name.yaml + + 3 + + name + string.unquoted.directive-parameter.yaml + + + match + (?x) \G (\w+) (?:[ \t]+ (\w+) (?:[ \t]+ (\w+))? )? + + + match + \S+ + name + invalid.illegal.unrecognized.yaml + + + + flow-alias + + captures + + 1 + + name + keyword.control.flow.alias.yaml + + 2 + + name + punctuation.definition.alias.yaml + + 3 + + name + variable.other.alias.yaml + + 4 + + name + invalid.illegal.character.anchor.yaml + + + match + ((\*))([^\s\[\]/{/},]+)([^\s\]},]\S*)? + + flow-collection + + patterns + + + include + #flow-sequence + + + include + #flow-mapping + + + + flow-mapping + + begin + \{ + beginCaptures + + 0 + + name + punctuation.definition.mapping.begin.yaml + + + end + \} + endCaptures + + 0 + + name + punctuation.definition.mapping.end.yaml + + + name + meta.flow-mapping.yaml + patterns + + + include + #prototype + + + match + , + name + punctuation.separator.mapping.yaml + + + include + #flow-pair + + + + flow-node + + patterns + + + include + #prototype + + + include + #flow-alias + + + include + #flow-collection + + + include + #flow-scalar + + + + flow-pair + + patterns + + + begin + \? + beginCaptures + + 0 + + name + punctuation.definition.key-value.begin.yaml + + + end + (?=[},\]]) + name + meta.flow-pair.explicit.yaml + patterns + + + include + #prototype + + + include + #flow-pair + + + include + #flow-node + + + begin + :(?=\s|$|[\[\]{},]) + beginCaptures + + 0 + + name + punctuation.separator.key-value.mapping.yaml + + + end + (?=[},\]]) + patterns + + + include + #flow-value + + + + + + + begin + (?x) + (?= + (?: + [^\s[-?:,\[\]{}#&*!|>'"%@`]] + | [?:-] [^\s[\[\]{},]] + ) + ( + [^\s:[\[\]{},]] + | : [^\s[\[\]{},]] + | \s+ (?![#\s]) + )* + \s* + : + (\s|$) + ) + + end + (?x) + (?= + \s* $ + | \s+ \# + | \s* : (\s|$) + | \s* : [\[\]{},] + | \s* [\[\]{},] + ) + + name + meta.flow-pair.key.yaml + patterns + + + include + #flow-scalar-plain-in-implicit-type + + + begin + (?x) + [^\s[-?:,\[\]{}#&*!|>'"%@`]] + | [?:-] [^\s[\[\]{},]] + + beginCaptures + + 0 + + name + entity.name.tag.yaml + + + contentName + entity.name.tag.yaml + end + (?x) + (?= + \s* $ + | \s+ \# + | \s* : (\s|$) + | \s* : [\[\]{},] + | \s* [\[\]{},] + ) + + name + string.unquoted.plain.in.yaml + + + + + include + #flow-node + + + begin + :(?=\s|$|[\[\]{},]) + captures + + 0 + + name + punctuation.separator.key-value.mapping.yaml + + + end + (?=[},\]]) + name + meta.flow-pair.yaml + patterns + + + include + #flow-value + + + + + + flow-scalar + + patterns + + + include + #flow-scalar-double-quoted + + + include + #flow-scalar-single-quoted + + + include + #flow-scalar-plain-in + + + + flow-scalar-double-quoted + + begin + " + beginCaptures + + 0 + + name + punctuation.definition.string.begin.yaml + + + end + " + endCaptures + + 0 + + name + punctuation.definition.string.end.yaml + + + name + string.quoted.double.yaml + patterns + + + match + \\([0abtnvfre "/\\N_Lp]|x\d\d|u\d{4}|U\d{8}) + name + constant.character.escape.yaml + + + match + \\\n + name + constant.character.escape.double-quoted.newline.yaml + + + + flow-scalar-plain-in + + patterns + + + include + #flow-scalar-plain-in-implicit-type + + + begin + (?x) + [^\s[-?:,\[\]{}#&*!|>'"%@`]] + | [?:-] [^\s[\[\]{},]] + + end + (?x) + (?= + \s* $ + | \s+ \# + | \s* : (\s|$) + | \s* : [\[\]{},] + | \s* [\[\]{},] + ) + + name + string.unquoted.plain.in.yaml + + + + flow-scalar-plain-in-implicit-type + + patterns + + + captures + + 1 + + name + constant.language.null.yaml + + 2 + + name + constant.language.boolean.yaml + + 3 + + name + constant.numeric.integer.yaml + + 4 + + name + constant.numeric.float.yaml + + 5 + + name + constant.other.timestamp.yaml + + 6 + + name + constant.language.value.yaml + + 7 + + name + constant.language.merge.yaml + + + match + (?x) + (?x: + (null|Null|NULL|~) + | (y|Y|yes|Yes|YES|n|N|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF) + | ( + (?: + [-+]? 0b [0-1_]+ # (base 2) + | [-+]? 0 [0-7_]+ # (base 8) + | [-+]? (?: 0|[1-9][0-9_]*) # (base 10) + | [-+]? 0x [0-9a-fA-F_]+ # (base 16) + | [-+]? [1-9] [0-9_]* (?: :[0-5]?[0-9])+ # (base 60) + ) + ) + | ( + (?x: + [-+]? (?: [0-9] [0-9_]*)? \. [0-9.]* (?: [eE] [-+] [0-9]+)? # (base 10) + | [-+]? [0-9] [0-9_]* (?: :[0-5]?[0-9])+ \. [0-9_]* # (base 60) + | [-+]? \. (?: inf|Inf|INF) # (infinity) + | \. (?: nan|NaN|NAN) # (not a number) + ) + ) + | ( + (?x: + \d{4} - \d{2} - \d{2} # (y-m-d) + | \d{4} # (year) + - \d{1,2} # (month) + - \d{1,2} # (day) + (?: [Tt] | [ \t]+) \d{1,2} # (hour) + : \d{2} # (minute) + : \d{2} # (second) + (?: \.\d*)? # (fraction) + (?: + (?:[ \t]*) Z + | [-+] \d{1,2} (?: :\d{1,2})? + )? # (time zone) + ) + ) + | (=) + | (<<) + ) + (?: + (?= + \s* $ + | \s+ \# + | \s* : (\s|$) + | \s* : [\[\]{},] + | \s* [\[\]{},] + ) + ) + + + + + flow-scalar-plain-out + + patterns + + + include + #flow-scalar-plain-out-implicit-type + + + begin + (?x) + [^\s[-?:,\[\]{}#&*!|>'"%@`]] + | [?:-] \S + + end + (?x) + (?= + \s* $ + | \s+ \# + | \s* : (\s|$) + ) + + name + string.unquoted.plain.out.yaml + + + + flow-scalar-plain-out-implicit-type + + patterns + + + captures + + 1 + + name + constant.language.null.yaml + + 2 + + name + constant.language.boolean.yaml + + 3 + + name + constant.numeric.integer.yaml + + 4 + + name + constant.numeric.float.yaml + + 5 + + name + constant.other.timestamp.yaml + + 6 + + name + constant.language.value.yaml + + 7 + + name + constant.language.merge.yaml + + + match + (?x) + (?x: + (null|Null|NULL|~) + | (y|Y|yes|Yes|YES|n|N|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF) + | ( + (?: + [-+]? 0b [0-1_]+ # (base 2) + | [-+]? 0 [0-7_]+ # (base 8) + | [-+]? (?: 0|[1-9][0-9_]*) # (base 10) + | [-+]? 0x [0-9a-fA-F_]+ # (base 16) + | [-+]? [1-9] [0-9_]* (?: :[0-5]?[0-9])+ # (base 60) + ) + ) + | ( + (?x: + [-+]? (?: [0-9] [0-9_]*)? \. [0-9.]* (?: [eE] [-+] [0-9]+)? # (base 10) + | [-+]? [0-9] [0-9_]* (?: :[0-5]?[0-9])+ \. [0-9_]* # (base 60) + | [-+]? \. (?: inf|Inf|INF) # (infinity) + | \. (?: nan|NaN|NAN) # (not a number) + ) + ) + | ( + (?x: + \d{4} - \d{2} - \d{2} # (y-m-d) + | \d{4} # (year) + - \d{1,2} # (month) + - \d{1,2} # (day) + (?: [Tt] | [ \t]+) \d{1,2} # (hour) + : \d{2} # (minute) + : \d{2} # (second) + (?: \.\d*)? # (fraction) + (?: + (?:[ \t]*) Z + | [-+] \d{1,2} (?: :\d{1,2})? + )? # (time zone) + ) + ) + | (=) + | (<<) + ) + (?x: + (?= + \s* $ + | \s+ \# + | \s* : (\s|$) + ) + ) + + + + + flow-scalar-single-quoted + + begin + ' + beginCaptures + + 0 + + name + punctuation.definition.string.begin.yaml + + + end + '(?!') + endCaptures + + 0 + + name + punctuation.definition.string.end.yaml + + + name + string.quoted.single.yaml + patterns + + + match + '' + name + constant.character.escape.single-quoted.yaml + + + + flow-sequence + + begin + \[ + beginCaptures + + 0 + + name + punctuation.definition.sequence.begin.yaml + + + end + \] + endCaptures + + 0 + + name + punctuation.definition.sequence.end.yaml + + + name + meta.flow-sequence.yaml + patterns + + + include + #prototype + + + match + , + name + punctuation.separator.sequence.yaml + + + include + #flow-pair + + + include + #flow-node + + + + flow-value + + patterns + + + begin + \G(?![},\]]) + end + (?=[},\]]) + name + meta.flow-pair.value.yaml + patterns + + + include + #flow-node + + + + + + node + + patterns + + + include + #block-node + + + + property + + begin + (?=!|&) + end + (?!\G) + name + meta.property.yaml + patterns + + + captures + + 1 + + name + keyword.control.property.anchor.yaml + + 2 + + name + punctuation.definition.anchor.yaml + + 3 + + name + entity.name.type.anchor.yaml + + 4 + + name + invalid.illegal.character.anchor.yaml + + + match + \G((&))([^\s\[\]/{/},]+)(\S+)? + + + match + (?x) + \G + (?: + ! < (?: %\p{XDigit}{2} | [0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]] )+ > + | (?:!(?:[0-9A-Za-z\-]*!)?) (?: %\p{XDigit}{2} | [0-9A-Za-z\-#;/?:@&=+$_.~*'()] )+ + | ! + ) + (?=\ |\t|$) + + name + storage.type.tag-handle.yaml + + + match + \S+ + name + invalid.illegal.tag-handle.yaml + + + + prototype + + patterns + + + include + #comment + + + include + #property + + + + + scopeName + source.yaml + uuid + 686AD6AE-33F3-4493-9512-9E9FC1D5417F + + diff --git a/vscode-extensions/vscode-concourse/package.json b/vscode-extensions/vscode-concourse/package.json index 0b9778d8c..7cf3aa4db 100644 --- a/vscode-extensions/vscode-concourse/package.json +++ b/vscode-extensions/vscode-concourse/package.json @@ -28,12 +28,6 @@ "onLanguage:concourse-task-yaml" ], "contributes": { - "commands": [ - { - "command": "mycommand.sayHello", - "title": "Say Hello" - } - ], "languages": [ { "id": "concourse-pipeline-yaml",