Contrib: updated vim syntax rules for variables.

Non-quoted parameters are allowed to contain variables in curly brackets
(see d91a8c4ac6bb), so vim syntax rules were adjusted accordingly.
This commit is contained in:
Maxim Dounin 2017-12-25 19:41:00 +03:00
parent 0ad556fe59
commit 9bc0ced4a7

View File

@ -15,7 +15,7 @@ endif
syn match ngxName '\([^;{} \t\\]\|\\.\)\+' syn match ngxName '\([^;{} \t\\]\|\\.\)\+'
\ contains=@ngxDirectives \ contains=@ngxDirectives
\ nextgroup=@ngxParams skipwhite skipempty \ nextgroup=@ngxParams skipwhite skipempty
syn match ngxParam '\([^;{ \t\\]\|\\.\)\+' syn match ngxParam '\(\${\|[^;{ \t\\]\|\\.\)\+'
\ contained \ contained
\ contains=ngxVariable \ contains=ngxVariable
\ nextgroup=@ngxParams skipwhite skipempty \ nextgroup=@ngxParams skipwhite skipempty
@ -29,7 +29,7 @@ syn region ngxBlock start=+{+ end=+}+ contained
\ contains=@ngxTopLevel \ contains=@ngxTopLevel
syn match ngxComment '#.*$' syn match ngxComment '#.*$'
syn match ngxVariable '\$\w\+' contained syn match ngxVariable '\$\(\w\+\|{\w\+}\)' contained
syn match ngxVariableString '\$\(\w\+\|{\w\+}\)' contained syn match ngxVariableString '\$\(\w\+\|{\w\+}\)' contained
syn cluster ngxTopLevel syn cluster ngxTopLevel
@ -52,7 +52,7 @@ syn cluster ngxParams add=ngxBoolean
syn cluster ngxTopLevel add=ngxDirectiveListen syn cluster ngxTopLevel add=ngxDirectiveListen
syn keyword ngxDirectiveListen listen syn keyword ngxDirectiveListen listen
\ nextgroup=@ngxListenParams skipwhite skipempty \ nextgroup=@ngxListenParams skipwhite skipempty
syn match ngxListenParam '\([^;{ \t\\]\|\\.\)\+' syn match ngxListenParam '\(\${\|[^;{ \t\\]\|\\.\)\+'
\ contained \ contained
\ nextgroup=@ngxListenParams skipwhite skipempty \ nextgroup=@ngxListenParams skipwhite skipempty
syn region ngxListenString start=+\z(["']\)+ end=+\z1+ skip=+\\\\\|\\\z1+ syn region ngxListenString start=+\z(["']\)+ end=+\z1+ skip=+\\\\\|\\\z1+