Problem: Highlighting nginx.conf is slow; the ngxSSLCipherInsecure group
alone accounts for ~39% of the total syntax parse time because it
is spread over ~34 separate non-contained :syn match rules that are
each scanned at every position of every line.
Solution: Merge the ~28 rules sharing the identical '[^!]\zs' prefix into a
single alternation match, keeping only the six rules that need a
different preceding-character constraint separate. Highlighting is
unchanged; total syntax parse time drops by ~42% on a large config.
Update the Date header to Vims preferred format.
closes: #21195
Signed-off-by: Julien Voisin <julien.voisin@dustri.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
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 <josef.schoenberger@tum.de>
Signed-off-by: Christian Brabandt <cb@256bit.org>
* Add support for missing keywords to the nginx syntax plugin
This adds support for several keywords from
- the built-in HTTP/2 module,
- the built-in SSL module,
- the built-in uWSGI module,
- the experimental QUIC branch,
- the third-party SSL CT module,
- the third-party dynamic TLS records patch.
Co-Author: ObserverOfTime <chronobserver@disroot.org>
* Add missing http2/ http3 keywords to nginx plugin
Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>