Skip to content

Commit dbb712b

Browse files
committed
syntax: some improvements to http results highlighting
1 parent 734e6e7 commit dbb712b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

syntax/httpResult.vim

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,17 @@ syn keyword httpResultTitle GET POST PATCH PUT HEAD DELETE nextgroup=httpResult
55
syn match httpResultPath ".*$" contained
66
syn match httpResultField /^\(\w\)[^:]\+:/he=e-1
77

8+
syn region httpResultString start=/\vr?"/ end=/\v"/
9+
syn match httpResultNumber /\v([a-zA-Z_:]\d*)@<!\d+(\.(\d+)?)?/
10+
811
syn include @json syntax/json.vim
9-
syn region jsonBody start="\v^\{" end="\v\S+\}$" contains=@json keepend
12+
syn region jsonBody start="\v\{" end="\v\}$" contains=@json keepend
1013

1114
hi link httpResultComment Comment
1215
hi link httpResultTitle Type
1316
hi link httpResultPath Title
1417
hi link httpResultField Variable
18+
hi link httpResultString String
19+
hi link httpResultNumber Number
1520

1621
let b:current_syntax = "httpResult"

0 commit comments

Comments
 (0)