runtime(nginx): highlight Lua in set_by_lua_block in syntax script

Commit: 
https://github.com/vim/vim/commit/e92998ea4dfbd6de3e028e74ef8042cebd7e0f4c
Author: Josef Schönberger <[email protected]>
Date:   Sun Feb 8 21:19:20 2026 +0000

    runtime(nginx): highlight Lua in set_by_lua_block in syntax script
    
    The set_by_lua_block directive of the Lua module takes an additional
    variable as an argument which currently breaks the detection of inline
    Lua blocks. For example:
    
        set_by_lua_block $myvar {
            return tonumber(ngx.var.myothervar)-1
        }
    
    closes: #19362
    
    Signed-off-by: Josef Schönberger <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/runtime/syntax/nginx.vim b/runtime/syntax/nginx.vim
index ad8bdbf35..b9aa85f48 100644
--- a/runtime/syntax/nginx.vim
+++ b/runtime/syntax/nginx.vim
@@ -2302,7 +2302,7 @@ let b:current_syntax = "nginx"
 " Enable nested LUA syntax highlighting
 unlet b:current_syntax
 syn include @LUA syntax/lua.vim
-syn region ngxLua start=+^\s*\w\+_by_lua_block\s*{+ end=+}+me=s-1 
contains=ngxBlock,@LUA
+syn region ngxLua start=+^\s*\w\+_by_lua_block\s*\(\$\w\+\s*\)\?{+ 
end=+}+me=s-1 contains=ngxBlock,@LUA
 let b:current_syntax = "nginx"
 
 

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1vpVmt-003rLz-ND%40256bit.org.

Raspunde prin e-mail lui