comparison vendor/vim-syntax/json.vim @ 595:0e72765944d4

Update vendors
author nanaya <me@myconan.net>
date Wed, 22 Mar 2017 00:27:53 +0900
parents 7fbadf8bd22e
children 035b23bb15da
comparison
equal deleted inserted replaced
594:2ac0fa5ba73c 595:0e72765944d4
3 " Maintainer: Eli Parra <eli@elzr.com> 3 " Maintainer: Eli Parra <eli@elzr.com>
4 " Last Change: 2014 Aug 23 4 " Last Change: 2014 Aug 23
5 " Version: 0.12 5 " Version: 0.12
6 6
7 if !exists("main_syntax") 7 if !exists("main_syntax")
8 if version < 600 8 " quit when a syntax file was already loaded
9 syntax clear 9 if exists("b:current_syntax")
10 elseif exists("b:current_syntax")
11 finish 10 finish
12 endif 11 endif
13 let main_syntax = 'json' 12 let main_syntax = 'json'
14 endif 13 endif
15 14
91 " Syntax: Braces 90 " Syntax: Braces
92 syn region jsonFold matchgroup=jsonBraces start="{" end=/}\(\_s\+\ze\("\|{\)\)\@!/ transparent fold 91 syn region jsonFold matchgroup=jsonBraces start="{" end=/}\(\_s\+\ze\("\|{\)\)\@!/ transparent fold
93 syn region jsonFold matchgroup=jsonBraces start="\[" end=/]\(\_s\+\ze"\)\@!/ transparent fold 92 syn region jsonFold matchgroup=jsonBraces start="\[" end=/]\(\_s\+\ze"\)\@!/ transparent fold
94 93
95 " Define the default highlighting. 94 " Define the default highlighting.
96 " For version 5.7 and earlier: only when not done already 95 " Only when an item doesn't have highlighting yet
97 " For version 5.8 and later: only when an item doesn't have highlighting yet 96 hi def link jsonPadding Operator
98 if version >= 508 || !exists("did_json_syn_inits") 97 hi def link jsonString String
99 if version < 508 98 hi def link jsonTest Label
100 let did_json_syn_inits = 1 99 hi def link jsonEscape Special
101 command -nargs=+ HiLink hi link <args> 100 hi def link jsonNumber Number
102 else 101 hi def link jsonBraces Delimiter
103 command -nargs=+ HiLink hi def link <args> 102 hi def link jsonNull Function
104 endif 103 hi def link jsonBoolean Boolean
105 HiLink jsonPadding Operator 104 hi def link jsonKeyword Label
106 HiLink jsonString String
107 HiLink jsonTest Label
108 HiLink jsonEscape Special
109 HiLink jsonNumber Number
110 HiLink jsonBraces Delimiter
111 HiLink jsonNull Function
112 HiLink jsonBoolean Boolean
113 HiLink jsonKeyword Label
114 105
115 if (!exists("g:vim_json_warnings") || g:vim_json_warnings==1) 106 if (!exists("g:vim_json_warnings") || g:vim_json_warnings==1)
116 HiLink jsonNumError Error 107 hi def link jsonNumError Error
117 HiLink jsonCommentError Error 108 hi def link jsonCommentError Error
118 HiLink jsonSemicolonError Error 109 hi def link jsonSemicolonError Error
119 HiLink jsonTrailingCommaError Error 110 hi def link jsonTrailingCommaError Error
120 HiLink jsonMissingCommaError Error 111 hi def link jsonMissingCommaError Error
121 HiLink jsonStringSQError Error 112 hi def link jsonStringSQError Error
122 HiLink jsonNoQuotesError Error 113 hi def link jsonNoQuotesError Error
123 HiLink jsonTripleQuotesError Error 114 hi def link jsonTripleQuotesError Error
124 endif
125 HiLink jsonQuote Quote
126 HiLink jsonNoise Noise
127 delcommand HiLink
128 endif 115 endif
116 hi def link jsonQuote Quote
117 hi def link jsonNoise Noise
129 118
130 let b:current_syntax = "json" 119 let b:current_syntax = "json"
131 if main_syntax == 'json' 120 if main_syntax == 'json'
132 unlet main_syntax 121 unlet main_syntax
133 endif 122 endif