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