|
| 1 | +{ |
| 2 | + "$schema": "https://raw.githubusercontent.com/RedCMD/TmLanguage-Syntax-Highlighter/main/vscode.tmLanguage.schema.json", |
| 3 | + "name": "\"filenamePatterns\", \"fileMatch\" & \"workspaces\" inside `package.json` and \"include\", \"exclude\" & \"moduleTypes\" inside `tsconfig.json`", |
| 4 | + "comment": "https://code.visualstudio.com/docs/editor/glob-patterns", |
| 5 | + "scopeName": "source.json.package.glob", |
| 6 | + "injectionSelector": [ |
| 7 | + "L:source.json.embedded .meta.embedded.contributes. .meta.embedded.languages. meta.structure.array.json .meta.embedded.filenamePatterns. meta.structure.array.json string.quoted.double.json -(meta.structure.dictionary.json meta.structure.dictionary.json meta.structure.dictionary.json meta.structure.dictionary.json) -(meta.structure.array.json meta.structure.array.json meta.structure.array.json) -meta.embedded.glob.json -comment", |
| 8 | + "L:source.json.embedded .meta.embedded.contributes. .meta.embedded.jsonValidation. meta.structure.array.json .meta.embedded.fileMatch. string.quoted.double.json -(meta.structure.dictionary.json meta.structure.dictionary.json meta.structure.dictionary.json meta.structure.dictionary.json) -(meta.structure.array.json meta.structure.array.json) -meta.embedded.glob.json -comment", |
| 9 | + "L:source.json.embedded .meta.embedded.workspaces. meta.structure.array.json string.quoted.double.json -(meta.structure.dictionary.json meta.structure.dictionary.json) -(meta.structure.array.json meta.structure.array.json) -meta.embedded.glob.json -comment", |
| 10 | + "L:source.json.embedded .meta.embedded.workspaces. .meta.embedded.packages. meta.structure.array.json string.quoted.double.json -(meta.structure.dictionary.json meta.structure.dictionary.json meta.structure.dictionary.json) -(meta.structure.array.json meta.structure.array.json) -meta.embedded.glob.json -comment", |
| 11 | + "L:source.json.comments.embedded .meta.embedded.configurations. meta.structure.array.json.comments string.quoted.double.json.comments (.meta.embedded.skipFiles. | .meta.embedded.outFiles.) -(meta.structure.dictionary.json.comments meta.structure.dictionary.json.comments meta.structure.dictionary.json.comments) -(meta.structure.array.json.comments meta.structure.array.json.comments meta.structure.array.json.comments) -meta.embedded.glob.json -comment", |
| 12 | + "L:source.json.comments.embedded meta.structure.array.json.comments string.quoted.double.json.comments (.meta.embedded.include. | .meta.embedded.exclude.) -(meta.structure.dictionary.json.comments meta.structure.dictionary.json.comments) -(meta.structure.array.json.comments meta.structure.array.json.comments) -meta.embedded.glob.json -comment", |
| 13 | + "L:source.json.comments.embedded .meta.embedded.ts-node. .meta.embedded.moduleTypes. meta.structure.dictionary.json.comments support.type.property-name.json.comments -(meta.structure.dictionary.json.comments meta.structure.dictionary.json.comments meta.structure.dictionary.json.comments meta.structure.dictionary.json.comments) -meta.structure.array.json.comments -meta.embedded.glob.json -comment" |
| 14 | + ], |
| 15 | + "patterns": [ |
| 16 | + { |
| 17 | + "begin": "(?<=\")\\G(?=(?>[^\\x00-\\x1F\"\\\\]++|\\\\.)++\")", |
| 18 | + "end": "(?=\"|$)", |
| 19 | + "name": "meta.embedded.glob.json", |
| 20 | + "contentName": "string.regexp.glob.json", |
| 21 | + "patterns": [ { "include": "#glob" } ] |
| 22 | + } |
| 23 | + ], |
| 24 | + "repository": { |
| 25 | + "glob": { |
| 26 | + "patterns": [ |
| 27 | + { |
| 28 | + "match": "(\\\\?)/", |
| 29 | + "name": "keyword.separator.path.glob-split.glob.json", |
| 30 | + "captures": { "1": { "name": "constant.character.escape.glob.json" } } |
| 31 | + }, |
| 32 | + { |
| 33 | + "match": "(\\*\\*)(\\**)|(\\*)", |
| 34 | + "name": "keyword.operator.quantifier.regexp.glob.json", |
| 35 | + "captures": { |
| 36 | + "1": { "name": "punctuation.definition.globstar.glob.json" }, |
| 37 | + "2": { "name": "comment.globstar.glob.json" }, |
| 38 | + "3": { "name": "punctuation.definition.star.glob.json" } |
| 39 | + } |
| 40 | + }, |
| 41 | + { |
| 42 | + "match": "\\?", |
| 43 | + "name": "keyword.operator.quantifier.regexp.glob.json" |
| 44 | + }, |
| 45 | + { |
| 46 | + "match": "}", |
| 47 | + "name": "comment.group.glob.json" |
| 48 | + }, |
| 49 | + { |
| 50 | + "begin": "{", |
| 51 | + "end": "}|(?=\")|$", |
| 52 | + "beginCaptures": { "0": { "name": "punctuation.definition.group.begin.glob.json" } }, |
| 53 | + "endCaptures": { "0": { "name": "punctuation.definition.group.end.glob.json" } }, |
| 54 | + "name": "meta.embedded.group.glob.json", |
| 55 | + "contentName": "string.regexp.glob.json", |
| 56 | + "patterns": [ |
| 57 | + { |
| 58 | + "match": ",", |
| 59 | + "name": "keyword.operator.separator.comma.glob.json punctuation.separator.comma.glob.string" |
| 60 | + }, |
| 61 | + { "include": "#glob" } |
| 62 | + ] |
| 63 | + }, |
| 64 | + { |
| 65 | + "match": "]", |
| 66 | + "name": "meta.embedded.character-class.glob.json", |
| 67 | + "captures": { "0": { "name": "invalid.illegal.character-class.end.glob.json" } } |
| 68 | + }, |
| 69 | + { |
| 70 | + "begin": "(\\[)((?:\\\\?/)*)([!^]?)((?:\\\\?/)*)", |
| 71 | + "end": "(?!\\G)]|(?=\")|$", |
| 72 | + "beginCaptures": { |
| 73 | + "1": { "name": "punctuation.definition.character-class.begin.glob.json" }, |
| 74 | + "2": { "patterns": [ { "include": "#glob-split" } ] }, |
| 75 | + "3": { "name": "keyword.operator.negation.glob.json" }, |
| 76 | + "4": { "patterns": [ { "include": "#glob-split" } ] } |
| 77 | + }, |
| 78 | + "endCaptures": { "0": { "name": "punctuation.definition.character-class.end.glob.json" } }, |
| 79 | + "name": "meta.embedded.character-class.glob.json", |
| 80 | + "contentName": "constant.other.character-class.set.regexp.string.glob.json", |
| 81 | + "patterns": [ |
| 82 | + { "include": "#glob-split" }, |
| 83 | + { |
| 84 | + "match": "[0-9]-[0-9]", |
| 85 | + "name": "constant.numeric.character-class.range.glob.json" |
| 86 | + }, |
| 87 | + { |
| 88 | + "match": "[a-z]-[a-z]|[A-Z]-[A-Z]", |
| 89 | + "name": "variable.other.constant.character-class.range.glob.json" |
| 90 | + }, |
| 91 | + { |
| 92 | + "comment": "Character Class Range contains glob-split character / ", |
| 93 | + "match": "[ -.]-(?:[0-\\[^-~]|(?=\\\\))", |
| 94 | + "name": "invalid.illegal.character-class.range.glob-split.glob.json" |
| 95 | + }, |
| 96 | + { |
| 97 | + "match": "(?:(\\\\)[\\\\\"]|[^\\\\/])((?:\\\\?/)*)-((?:\\\\?/)*)(?:(\\\\)[\\\\\"]|[^]\\\\\"/])", |
| 98 | + "captures": { |
| 99 | + "0": { "name": "support.class.range.string.glob.json" }, |
| 100 | + "1": { "name": "constant.character.escape.backslash.glob.json" }, |
| 101 | + "2": { "patterns": [ { "include": "#glob-split" } ] }, |
| 102 | + "3": { "patterns": [ { "include": "#glob-split" } ] }, |
| 103 | + "4": { "name": "constant.character.escape.backslash.glob.json" } |
| 104 | + }, |
| 105 | + "name": "constant.other.character-class.range.glob.json" |
| 106 | + }, |
| 107 | + { |
| 108 | + "match": "(\\\\?)\\\\", |
| 109 | + "captures": { "1": { "name": "constant.character.escape.glob.json" } } |
| 110 | + }, |
| 111 | + { "include": "source.json.embedded#stringcontent" } |
| 112 | + ] |
| 113 | + }, |
| 114 | + { |
| 115 | + "match": "(\\\\?)\\\\", |
| 116 | + "captures": { "1": { "name": "constant.character.escape.glob.json" } } |
| 117 | + }, |
| 118 | + { "include": "source.json.embedded#stringcontent" } |
| 119 | + ] |
| 120 | + }, |
| 121 | + "glob-split": { |
| 122 | + "comment": "glob-split / is ignored inside square brackets https://man7.org/linux/man-pages/man7/glob.7.html", |
| 123 | + "match": "(\\\\?)/", |
| 124 | + "name": "comment.invalid.illegal.glob-split.glob.json", |
| 125 | + "captures": { "1": { "name": "constant.character.escape.glob.json" } } |
| 126 | + } |
| 127 | + } |
| 128 | +} |
0 commit comments