|
1 | 1 | if exists("b:current_syntax") | finish | endif
|
2 | 2 |
|
3 |
| -syn match httpResultComment "\v^#.*$" |
4 |
| -syn keyword httpResultTitle GET POST PATCH PUT HEAD DELETE nextgroup=httpResultPath |
5 |
| -syn match httpResultPath ".*$" contained |
6 |
| -syn match httpResultField /^\(\w\)[^:]\+:/he=e-1 |
| 3 | +syn match httpResultComment "\v^#.*$" |
| 4 | +syn keyword httpResultTitle GET POST PATCH PUT HEAD DELETE nextgroup=httpResultPath |
| 5 | +syn match httpResultPat /.*$/ contained |
7 | 6 |
|
8 |
| -syn region httpResultString start=/\vr?"/ end=/\v"/ |
9 |
| -syn match httpResultNumber /\v([a-zA-Z_:]\d*)@<!\d+(\.(\d+)?)?/ |
| 7 | +syn match httpResultField /^\(\w\)[^:]\+:/he=e-1 |
| 8 | +syn region httpResultDateField start=+^[Dd]ate:+he=e-1 end=+ + nextgroup=httpResultDate |
| 9 | +syn region httpResultDateField start=+^[Ee]xpires:+he=e-1 end=+ + nextgroup=httpResultDate |
| 10 | +syn match httpResultDate /.*$/ contained |
| 11 | + |
| 12 | +syn region httpResultHeader start=+^HTTP/+ end=+ + nextgroup=httpResult200,httpResult300,httpResult400,httpResult500 |
| 13 | +syn match httpResult200 /2.*$/ contained |
| 14 | +syn match httpResult300 /3.*$/ contained |
| 15 | +syn match httpResult400 /4.*$/ contained |
| 16 | +syn match httpResult500 /5.*$/ contained |
10 | 17 |
|
11 |
| -syn include @json syntax/json.vim |
12 |
| -syn region jsonBody start="\v\{" end="\v\}$" contains=@json keepend |
| 18 | +syn region httpResultString start=/\vr?"/ end=/\v"/ |
| 19 | +syn match httpResultNumber /\v[ =]@1<=\d+[ \n]/ |
13 | 20 |
|
14 |
| -hi link httpResultComment Comment |
15 |
| -hi link httpResultTitle Type |
16 |
| -hi link httpResultPath Title |
17 |
| -hi link httpResultField Variable |
18 |
| -hi link httpResultString String |
19 |
| -hi link httpResultNumber Number |
| 21 | +hi link httpResultComment Comment |
| 22 | +hi link httpResultTitle Type |
| 23 | +hi link httpResultPath httpTSURI |
| 24 | +hi link httpResultField Identifier |
| 25 | +hi link httpResultDateField Identifier |
| 26 | +hi link httpResultDate String |
| 27 | +hi link httpResultString String |
| 28 | +hi link httpResultNumber Number |
| 29 | +hi link httpResultHeader Type |
| 30 | +hi link httpResult200 String |
| 31 | +hi link httpResult300 Function |
| 32 | +hi link httpResult400 Number |
| 33 | +hi link httpResult500 Number |
20 | 34 |
|
21 | 35 | let b:current_syntax = "httpResult"
|
0 commit comments