[PATCH 1 of 2] Contrib: vim syntax, update 3rd party module directives.

Maxim Dounin mdounin at mdounin.ru
Fri Dec 29 21:54:32 UTC 2017


Hello!

On Thu, Dec 28, 2017 at 12:06:23PM +0200, Gena Makhomed wrote:

> # HG changeset patch
> # User Gena Makhomed <gmm at csdoc.com>
> # Date 1514454584 -7200
> #      Thu Dec 28 11:49:44 2017 +0200
> # Node ID 215684d20d906135281b2540149d354b6e4bb852
> # Parent  6939f75c4b139203d409517c4f0e35342a3e70cb
> Contrib: vim syntax, update 3rd party module directives.
> 
> 3rd party modules list synchronized with FreeBSD nginx-devel port.
> 
> diff -r 6939f75c4b13 -r 215684d20d90 contrib/vim/syntax/nginx.vim
> --- a/contrib/vim/syntax/nginx.vim	Mon Dec 25 18:30:01 2017 +0200
> +++ b/contrib/vim/syntax/nginx.vim	Thu Dec 28 11:49:44 2017 +0200
> @@ -683,529 +683,618 @@
>   syn keyword ngxDirective contained xslt_types
>   syn keyword ngxDirective contained zone
> 
> -" 3rd party module list:
> -" https://www.nginx.com/resources/wiki/modules/
> +" 3rd party modules list taken from
> +" 
> https://github.com/freebsd/freebsd-ports/blob/master/www/nginx-devel/Makefile
> +" 
> -----------------------------------------------------------------------------
> 
> -" Accept Language Module 
> <https://www.nginx.com/resources/wiki/modules/accept_language/>
> -" Parses the Accept-Language header and gives the most suitable locale 
> from a list of supported locales.
> +" Accept Language
> +" https://github.com/giom/nginx_accept_language_module
>   syn keyword ngxDirectiveThirdParty contained set_from_accept_language

[...]

> @@ -2178,6 +2236,7 @@
>   hi link ngxDirectiveDeprecated Error
>   hi link ngxDirective Identifier
>   hi link ngxDirectiveThirdParty Special
> +hi link ngxDirectiveThirdPartyDeprecated Error

For ngxDirectiveThirdPartyDeprecated to actually work, you have to 
link into the ngxDirectives cluster:

diff --git a/contrib/vim/syntax/nginx.vim b/contrib/vim/syntax/nginx.vim
--- a/contrib/vim/syntax/nginx.vim
+++ b/contrib/vim/syntax/nginx.vim
@@ -37,7 +37,7 @@ syn cluster ngxTopLevel
 syn cluster ngxDirectives
     \ contains=ngxDirective,ngxDirectiveBlock,ngxDirectiveImportant
     \ add=ngxDirectiveControl,ngxDirectiveError,ngxDirectiveDeprecated
-    \ add=ngxDirectiveThirdParty
+    \ add=ngxDirectiveThirdParty,ngxDirectiveThirdPartyDeprecated
 syn cluster ngxParams
     \ contains=ngxParam,ngxString,ngxParamComment,ngxSemicolon,ngxBlock
 
Committed with the above fix, thanks.

-- 
Maxim Dounin
http://mdounin.ru/


More information about the nginx-devel mailing list