This commit is contained in:
Adam Stankiewicz
2017-05-17 11:07:28 +02:00
parent ef369d45a5
commit af87010071
38 changed files with 1250 additions and 845 deletions

View File

@@ -10,9 +10,9 @@ end
" Patch 7.4.1142
if has("patch-7.4-1142")
if has("win32")
syn iskeyword @,48-57,_,128-167,224-235,.,/,:
syn iskeyword @,48-57,_,128-167,224-235,.,/,:,-
else
syn iskeyword @,48-57,_,192-255,.,/,:
syn iskeyword @,48-57,_,192-255,.,/,:,-
endif
endif
@@ -25,6 +25,11 @@ syn region ngxString start=+[^:a-zA-Z>!\\@]\z(["']\)+lc=1 end=+\z1+ skip=+\\\\\|
syn keyword ngxBoolean on
syn keyword ngxBoolean off
" Number and Measures http://nginx.org/en/docs/syntax.html
syn match ngxNumber '\<\d\+\>'
syn match ngxMeasure '\<\d\+ms\>'
syn match ngxMeasure '\<\d\+[smhdwMy]\>'
syn match ngxMeasure '\<\d\+[kKmMgG]\>'
syn keyword ngxDirectiveBlock http
syn keyword ngxDirectiveBlock mail
@@ -48,7 +53,7 @@ syn keyword ngxDirectiveImportant root
syn keyword ngxDirectiveImportant server
syn keyword ngxDirectiveImportant server_name
syn keyword ngxDirectiveImportant listen contained
syn region ngxDirectiveImportantListen matchgroup=ngxDirectiveImportant start=+listen+ skip=+\\\\\|\\\;+ end=+;+he=e-1 contains=ngxListenOptions,ngxString
syn region ngxDirectiveImportantListen matchgroup=ngxDirectiveImportant start=+listen+ skip=+\\\\\|\\\;+ end=+;+he=e-1 contains=ngxListenOptions,ngxNumber,ngxString
syn keyword ngxDirectiveImportant internal
syn keyword ngxDirectiveImportant proxy_pass
syn keyword ngxDirectiveImportant memcached_pass
@@ -84,9 +89,9 @@ syn match ngxStatusCode /\d\d\d/ contained
syn match ngxStatusCodes /\d\d\d/ contained contains=ngxStatusCode nextgroup=ngxStatusCode skipwhite skipempty
syn match ngxRewriteURI /\S\+/ contained contains=ngxVariableString nextgroup=ngxRewritedURI skipwhite skipempty
syn region ngxRewriteURI start=+[^:a-zA-Z>!\\@]\z(["']\)+lc=1 end=+\z1+ skip=+\\\\\|\\\z1+ contains=ngxVariableString nextgroup=ngxRewritedURI skipwhite skipempty
syn region ngxRewriteURI start=+[^:a-zA-Z>!\\@]\z(["']\)+lc=1 end=+\z1+ skip=+\\\\\|\\\z1+ contained contains=ngxVariableString nextgroup=ngxRewritedURI skipwhite skipempty
syn match ngxRewritedURI /\S\+/ contained contains=ngxVariableString nextgroup=ngxRewriteFlag skipwhite skipempty
syn region ngxRewritedURI start=+[^:a-zA-Z>!\\@]\z(["']\)+lc=1 end=+\z1+ skip=+\\\\\|\\\z1+ contains=ngxVariableString nextgroup=ngxRewriteFlag skipwhite skipempty
syn region ngxRewritedURI start=+[^:a-zA-Z>!\\@]\z(["']\)+lc=1 end=+\z1+ skip=+\\\\\|\\\z1+ contained contains=ngxVariableString nextgroup=ngxRewriteFlag skipwhite skipempty
syn keyword ngxRewriteFlag last contained
syn keyword ngxRewriteFlag break contained
@@ -137,7 +142,10 @@ syn keyword ngxDirective autoindex
syn keyword ngxDirective autoindex_exact_size
syn keyword ngxDirective autoindex_format
syn keyword ngxDirective autoindex_localtime
syn keyword ngxDirective charset
syn keyword ngxDirective charset nextgroup=ngxCharset skipwhite skipempty
syn keyword ngxCharset utf-8 UTF-8
syn keyword ngxDirective charset_map
syn keyword ngxDirective charset_types
syn keyword ngxDirective chunked_transfer_encoding
@@ -2189,27 +2197,34 @@ syn keyword ngxDirectiveThirdParty xss_input_types
" highlight
hi link ngxComment Comment
hi link ngxVariable Identifier
hi link ngxVariable PreProc
hi link ngxVariableString PreProc
hi link ngxString String
hi link ngxLocationPath String
hi link ngxLocationNamedLoc Identifier
hi link ngxLocationNamedLoc PreProc
hi link ngxBoolean Boolean
hi link ngxStatusCode Number
hi link ngxRewriteFlag Boolean
hi link ngxDirective Identifier
hi link ngxDirectiveBlock Statement
hi link ngxDirectiveImportant Type
hi link ngxDirectiveControl Keyword
hi link ngxDirectiveError Constant
hi link ngxDirectiveThirdParty Identifier
hi link ngxDirectiveDeprecated Error
hi link ngxDirective Identifier
hi link ngxDirectiveThirdParty Special
hi link ngxBoolean Boolean
hi link ngxNumber Number
hi link ngxMeasure Number
hi link ngxStatusCode Number
hi link ngxRewriteFlag Boolean
hi link ngxCharset keyword
hi link ngxListenOptions Keyword
hi link ngxMailProtocol Keyword
hi link ngxSSLProtocol Keyword
hi link ngxRewriteURI Special
hi link ngxRewritedURI StorageClass
hi link ngxThirdPartyKeyword keyword
let b:current_syntax = "nginx"