|
1 | 1 | {
|
2 |
| - "name": "Salesforce http API", |
3 | 2 | "scopeName": "source.sfhttp",
|
4 |
| - "patterns": [{ "include": "#method-and-headers" }], |
5 |
| - "repository": { |
6 |
| - "method-and-headers": { |
7 |
| - "patterns": [{ "include": "#method-and-url" }, { "include": "#header" }], |
8 |
| - "end": "\\r?\\n\\r?\\n" |
9 |
| - }, |
10 |
| - "method-and-url": { |
| 3 | + "name": "Salesforce HTTP API", |
| 4 | + "patterns": [ |
| 5 | + { |
| 6 | + "name": "meta.request-line.sfhttp", |
| 7 | + "match": "^(GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD)\\s+([^\\s]+)", |
11 | 8 | "captures": {
|
12 |
| - "1": { "name": "http.sf.method" }, |
13 |
| - "2": { "name": "http.sf.url" } |
14 |
| - }, |
15 |
| - "match": "(?i)^(GET|POST|PUT|DELETE|PATCH) (.*)$\\n?", |
16 |
| - "name": "meta.http.sf.method-url" |
| 9 | + "1": { "name": "keyword.control.http.method.sfhttp" }, |
| 10 | + "2": { "name": "string.unquoted.url.path.sfhttp" } |
| 11 | + } |
17 | 12 | },
|
18 |
| - "header": { |
| 13 | + { |
| 14 | + "name": "meta.header.sfhttp", |
| 15 | + "match": "^([A-Za-z-]+):(\\s*)(.+)$", |
19 | 16 | "captures": {
|
20 |
| - "1": { "name": "http.sf.header.name" }, |
21 |
| - "2": { "name": "http.sf.header.value" } |
22 |
| - }, |
23 |
| - "match": "(?i)^([a-z]+)[ ]*:[ ]*([a-z]+)$\\n?", |
24 |
| - "name": "meta.http.sf.header" |
| 17 | + "1": { "name": "keyword.other.http.header.name.sfhttp" }, |
| 18 | + "3": { "name": "string.unquoted.header.value.sfhttp" } |
| 19 | + } |
25 | 20 | },
|
26 |
| - "comment": { |
27 |
| - "captures": { |
28 |
| - "1": { |
29 |
| - "name": "http.sf.method.comment" |
30 |
| - } |
31 |
| - }, |
32 |
| - "match": "(//).*$\\n?", |
33 |
| - "name": "comment.line.double-slash" |
| 21 | + { "include": "#json-block" }, |
| 22 | + { "include": "#xml-block" }, |
| 23 | + { "include": "#graphql-block" } |
| 24 | + ], |
| 25 | + "repository": { |
| 26 | + "json-block": { |
| 27 | + "begin": "^(?=\\s*[\\{\\[])", |
| 28 | + "end": "^(?=\\s*$)", |
| 29 | + "patterns": [{ "include": "source.json" }] |
| 30 | + }, |
| 31 | + "xml-block": { |
| 32 | + "begin": "^(?=\\s*<\\?*[^\\s>]+)", |
| 33 | + "end": "^(?=\\s*$)", |
| 34 | + "patterns": [{ "include": "text.xml" }] |
| 35 | + }, |
| 36 | + "graphql-block": { |
| 37 | + "begin": "^(?=\\s*\\{\\s*(query|mutation|subscription)?\\s*\\{?)", |
| 38 | + "end": "^(?=\\s*$)", |
| 39 | + "patterns": [{ "include": "source.graphql" }] |
34 | 40 | }
|
35 |
| - } |
| 41 | + }, |
| 42 | + "fileTypes": ["sfhttp"], |
| 43 | + "uuid": "3f1cda14-9d21-4b13-aaa4-2b9f57dbf6c0" |
36 | 44 | }
|
0 commit comments