dotfiles-pub/common/nano/syntax/nginx.nanorc

169 lines
14 KiB
Plaintext

syntax "nginx" "nginx.*\.conf$" "\.nginx$"
header "^(server|upstream)[a-z ]*\{$"
# Resets everything back to plain text coloring.
# Can be used at the start of each theme file.
color white "^.*$"
color brightwhite "(^|[[:space:]])([0-9]+(ms|[kKmMshdwy])?[[:space:]]*?)+($|;)"
color red "(^|[[:space:]{;])(accept_mutex(_delay)?|access_log|add_(header|(after|before)_body))([[:space:]]|$)"
color red "(^|[[:space:]{;])(addition_types|aio(_write)?|alias|allow|ancient_browser(_value)?)([[:space:]]|$)"
color red "(^|[[:space:]{;])auth_(basic|http_(header|pass_client_cert|timeout)|request(_set)?)([[:space:]]|$)"
color red "(^|[[:space:]{;])(autoindex_(exact_size|format|localtime)|break|charset|charset_(map|types))([[:space:]]|$)"
color red "(^|[[:space:]{;])(autoindex|chunked_transfer_encoding)([[:space:]]|$)"
color red "(^|[[:space:]{;])client_(body_(buffer_size|in_(file_only|single_buffer)|temp_path|timeout))([[:space:]]|$)"
color red "(^|[[:space:]{;])client_(header_(buffer_size|timeout)|max_body_size)([[:space:]]|$)"
color red "(^|[[:space:]{;])(connection_pool_size|create_full_put_path|daemon|dav_(access|methods))([[:space:]]|$)"
color red "(^|[[:space:]{;])(debug_(connection|points)|default_type|deny|directio(_alignment)?)([[:space:]]|$)"
color red "(^|[[:space:]{;])(disable_symlinks|empty_gif|env|error_(log|page)|etag|expires)([[:space:]]|$)"
color red "(^|[[:space:]{;])f4f(_buffer_size)?([[:space:]]|$)"
color red "(^|[[:space:]{;])fastcgi_(bind|buffer(_size|ing|s)|busy_buffers_size|cache)([[:space:]]|$)"
color red "(^|[[:space:]{;])fastcgi_cache_(bypass|key|lock|lock_(age|timeout)|methods|min_uses|path)([[:space:]]|$)"
color red "(^|[[:space:]{;])fastcgi_cache_(purge|revalidate|use_stale|valid)([[:space:]]|$)"
color red "(^|[[:space:]{;])fastcgi_(catch_stderr|(connect|read|send)_timeout|force_ranges|hide_header)([[:space:]]|$)"
color red "(^|[[:space:]{;])fastcgi_(ignore_(client_abort|headers)|index|intercept_errors|keep_conn)([[:space:]]|$)"
color red "(^|[[:space:]{;])fastcgi_(limit_rate|max_temp_file_size|next_upstream)([[:space:]]|$)"
color red "(^|[[:space:]{;])fastcgi_(next_upstream_(timeout|tries)|no_cache|param|pass)([[:space:]]|$)"
color red "(^|[[:space:]{;])fastcgi_(pass_(header|request_(body|headers))|request_buffering|send_lowat)([[:space:]]|$)"
color red "(^|[[:space:]{;])fastcgi_(store|store_access|temp_(file_write_size|path))([[:space:]]|$)"
color red "(^|[[:space:]{;])(flv|geo|geoip_(city|country|org|proxy|proxy_recursive))([[:space:]]|$)"
color red "(^|[[:space:]{;])(gunzip|gunzip_buffers|gzip)([[:space:]]|$)"
color red "(^|[[:space:]{;])gzip_(buffers|comp_level|disable|http_version)([[:space:]]|$)"
color red "(^|[[:space:]{;])gzip_(min_length|proxied|static|types|vary)([[:space:]]|$)"
color red "(^|[[:space:]{;])(hash|health_check|health_check_timeout|hls)([[:space:]]|$)"
color red "(^|[[:space:]{;])hls_(buffers|forward_args|fragment|mp4_(max)?buffer_size)([[:space:]]|$)"
color red "(^|[[:space:]{;])http2_(chunk_size|idle_timeout|max_(concurrent_streams|(field|header)_size))([[:space:]]|$)"
color red "(^|[[:space:]{;])http2_recv_(buffer_size|timeout)([[:space:]]|$)"
color red "(^|[[:space:]{;])(if|if_modified_since|ignore_invalid_headers|image_filter)([[:space:]]|$)"
color red "(^|[[:space:]{;])image_filter_(buffer|interlace|jpeg_quality|sharpen|transparency)([[:space:]]|$)"
color red "(^|[[:space:]{;])imap_(auth|capabilities|client_buffer)([[:space:]]|$)"
color red "(^|[[:space:]{;])(index|internal|ip_hash|keepalive)([[:space:]]|$)"
color red "(^|[[:space:]{;])keepalive_(disable|requests|timeout)([[:space:]]|$)"
color red "(^|[[:space:]{;])(large_client_header_buffers|least_(conn|time))([[:space:]]|$)"
color red "(^|[[:space:]{;])limit_(conn|conn_(log_level|status|zone)|except|rate|rate_after|req|zone)([[:space:]]|$)"
color red "(^|[[:space:]{;])limit_req_(log_level|status|zone)([[:space:]]|$)"
color red "(^|[[:space:]{;])(lingering_(close|time|timeout)|listen|location)([[:space:]]|$)"
color red "(^|[[:space:]{;])(log_(format|not_found|subrequest))([[:space:]]|$)"
color red "(^|[[:space:]{;])(map|map_hash_(bucket|max)_size|master_process|match|max_ranges)([[:space:]]|$)"
color red "(^|[[:space:]{;])memcached_(bind|buffer_size|(connect|read|send)_timeout|force_ranges)([[:space:]]|$)"
color red "(^|[[:space:]{;])memcached_(gzip_flag|next_(upstream|upstream_(timeout|tries))|pass)([[:space:]]|$)"
color red "(^|[[:space:]{;])(merge_slashes|min_delete_depth|modern_browser)([[:space:]]|$)"
color red "(^|[[:space:]{;])(modern_browser_value|mp4)([[:space:]]|$)"
color red "(^|[[:space:]{;])mp4_((max_)?buffer_size|limit_rate(_after)?)([[:space:]]|$)"
color red "(^|[[:space:]{;])(msie_(padding|refresh)|multi_accept|ntlm|open_file_cache)([[:space:]]|$)"
color red "(^|[[:space:]{;])(open_file_cache_(errors|min_uses|valid)|open_log_file_cache)([[:space:]]|$)"
color red "(^|[[:space:]{;])(output_buffers|override_charset|pcre_jit|perl|perl_(modules|require|set))([[:space:]]|$)"
color red "(^|[[:space:]{;])(pop3_(auth|capabilities)|port_in_redirect)([[:space:]]|$)"
color red "(^|[[:space:]{;])(postpone_output|protocol|proxy)([[:space:]]|$)"
color red "(^|[[:space:]{;])proxy_(bind|buffer(_size|ing|s)?|busy_buffers_size|cache)([[:space:]]|$)"
color red "(^|[[:space:]{;])proxy_cache_(bypass|convert_head|key|lock|lock_(age|timeout)|methods)([[:space:]]|$)"
color red "(^|[[:space:]{;])proxy_cache_(min_uses|path|purge|revalidate|use_stale|valid)([[:space:]]|$)"
color red "(^|[[:space:]{;])proxy_(cookie_(domain|path)|download_rate|force_ranges)([[:space:]]|$)"
color red "(^|[[:space:]{;])proxy_(headers_hash_(bucket|max)_size|hide_header|http_version)([[:space:]]|$)"
color red "(^|[[:space:]{;])proxy_(ignore_(client_abort|headers)|intercept_errors|limit_rate)([[:space:]]|$)"
color red "(^|[[:space:]{;])proxy_(max_temp_file_size|next_upstream(_timeout|_tries)?|no_cache|pass)([[:space:]]|$)"
color red "(^|[[:space:]{;])proxy_pass_(error_message|header|request_(body|headers))([[:space:]]|$)"
color red "(^|[[:space:]{;])proxy_((connect|read|send)_timeout|redirect|request_buffering|responses)([[:space:]]|$)"
color red "(^|[[:space:]{;])proxy_(send_lowat|set_(body|header)|ssl)([[:space:]]|$)"
color red "(^|[[:space:]{;])proxy_ssl_(ciphers|crl|name|protocols)([[:space:]]|$)"
color red "(^|[[:space:]{;])proxy_ssl_(server_name|session_reuse|verify(_depth)?)([[:space:]]|$)"
color red "(^|[[:space:]{;])proxy_(store(_access)?|temp_(file_write_size|path)|timeout|upload_rate)([[:space:]]|$)"
color red "(^|[[:space:]{;])(queue|random_index|read_ahead|real_ip_(header|recursive))([[:space:]]|$)"
color red "(^|[[:space:]{;])(recursive_error_pages|referer_hash_(bucket|max)_size|request_pool_size)([[:space:]]|$)"
color red "(^|[[:space:]{;])(reset_timedout_connection|resolver(_timeout)?|return|rewrite(_log)?)([[:space:]]|$)"
color red "(^|[[:space:]{;])scgi_(bind|buffer(_size|ing|s)|busy_buffers_size|cache)([[:space:]]|$)"
color red "(^|[[:space:]{;])(sc|uws)gi_cache_(bypass|key|lock|lock_(age|timeout)|methods)([[:space:]]|$)"
color red "(^|[[:space:]{;])(sc|uws)gi_cache_(min_uses|path|purge|revalidate|use_stale|valid)([[:space:]]|$)"
color red "(^|[[:space:]{;])scgi_((connect|read|send)_timeout|force_ranges|hide_header)([[:space:]]|$)"
color red "(^|[[:space:]{;])scgi_(ignore_(client_abort|headers)|intercept_errors|limit_rate)([[:space:]]|$)"
color red "(^|[[:space:]{;])scgi_(max_temp_file_size|next_upstream|next_upstream_(timeout|tries))([[:space:]]|$)"
color red "(^|[[:space:]{;])scgi_(no_cache|param|pass|pass_(header|request_(body|headers)))([[:space:]]|$)"
color red "(^|[[:space:]{;])scgi_(request_buffering|store(_access)?|temp_(file_write_size|path))([[:space:]]|$)"
color red "(^|[[:space:]{;])(satisfy|secure_link|secure_link_(md5|secret)|send_(lowat|timeout))([[:space:]]|$)"
color red "(^|[[:space:]{;])(sendfile(_max_chunk)?|server|server_(name|tokens))([[:space:]]|$)"
color red "(^|[[:space:]{;])server_name(_in_redirect|s_hash_(bucket|max)_size)([[:space:]]|$)"
color red "(^|[[:space:]{;])(session_log|session_log_(format|zone)|set|set_real_ip_from|slice)([[:space:]]|$)"
color red "(^|[[:space:]{;])(smtp_(auth|capabilities)|source_charset|spdy_(chunk_size|headers_comp))([[:space:]]|$)"
color red "(^|[[:space:]{;])(split_clients|ssi|ssl)([[:space:]]|$)"
color red "(^|[[:space:]{;])ssi_(last_modified|min_file_chunk|silent_errors|types|value_length)([[:space:]]|$)"
color red "(^|[[:space:]{;])ssl_(buffer_size|ciphers)([[:space:]]|$)"
color red "(^|[[:space:]{;])ssl_(crl|dhparam|ecdh_curve|engine|handshake_timeout)([[:space:]]|$)"
color red "(^|[[:space:]{;])ssl_(prefer_server_ciphers|protocols)([[:space:]]|$)"
color red "(^|[[:space:]{;])ssl_session_(cache|ticket_key|tickets|timeout)([[:space:]]|$)"
color red "(^|[[:space:]{;])ssl_(stapling(_verify)?|verify_(client|depth))([[:space:]]|$)"
color red "(^|[[:space:]{;])(starttls|state|(stub_)?status|status_(format|zone)|sticky(_cookie_insert)?)([[:space:]]|$)"
color red "(^|[[:space:]{;])(sub_filter|sub_filter_(last_modified|once|types)|tcp_no(delay|push))([[:space:]]|$)"
color red "(^|[[:space:]{;])(thread_pool|timeout|timer_resolution|try_files|types)([[:space:]]|$)"
color red "(^|[[:space:]{;])(types_hash_(bucket|max)_size|underscores_in_headers)([[:space:]]|$)"
color red "(^|[[:space:]{;])(uninitialized_variable_warn|upstream|use(r|id)?)([[:space:]]|$)"
color red "(^|[[:space:]{;])userid_(domain|expires|mark|name|p3p|service)([[:space:]]|$)"
color red "(^|[[:space:]{;])uwsgi_(bind|buffer(_size|ing|s)|busy_buffers_size|cache)([[:space:]]|$)"
color red "(^|[[:space:]{;])uwsgi_((connect|read|send)_timeout|force_ranges|hide_header)([[:space:]]|$)"
color red "(^|[[:space:]{;])uwsgi_(ignore_(client_abort|headers)|intercept_errors|limit_rate)([[:space:]]|$)"
color red "(^|[[:space:]{;])uwsgi_(max_temp_file_size|modifier[12]|next_upstream)([[:space:]]|$)"
color red "(^|[[:space:]{;])uwsgi_(next_upstream_(timeout|tries)|no_cache|param|pass)([[:space:]]|$)"
color red "(^|[[:space:]{;])uwsgi_(pass_(header|request_(body|headers))|request_buffering)([[:space:]]|$)"
color red "(^|[[:space:]{;])uwsgi_ssl_(ciphers|crl|name|protocols)([[:space:]]|$)"
color red "(^|[[:space:]{;])uwsgi_ssl_(server_name|session_reuse|verify(_depth)?)([[:space:]]|$)"
color red "(^|[[:space:]{;])uwsgi_(store(_access)?|temp_(file_write_size|path))([[:space:]]|$)"
color red "(^|[[:space:]{;])(valid_referers|variables_hash_(bucket|max)_size)([[:space:]]|$)"
color red "(^|[[:space:]{;])worker_(aio_requests|connections|cpu_affinity)([[:space:]]|$)"
color red "(^|[[:space:]{;])worker_(priority|processes|rlimit_(core|nofile))([[:space:]]|$)"
color red "(^|[[:space:]{;])(xclient|xml_entities|zone)([[:space:]]|$)"
color red "(^|[[:space:]{;])xslt_(last_modified|(string_)?param|stylesheet|types)([[:space:]]|$)"
color red "\<(events|http|location|mail|server|stream)[[:space:]]*\{"
# Context-sensitive keywords
color red "(^|[[:space:]{;])deny[[:space:]]+all[[:space:]]*([;#]|$)"
color red "(^|[[:space:]{;])gzip_proxied([[:space:]]+(off|expired|no-cache|no-store|private|no_last_modified|no_etag|auth|any))+[[:space:]]*([;#]|$)"
color red "(^|[[:space:]{;])(worker_cpu_affinity|worker_processes)[[:space:]]+auto[[:space:]]*([;#]|$)"
# Make white spaces plain again
color white "[[:space:]]+"
# Special cases for directives that take RegExp/path/URL as a single parameter
color brightblue start="(^|[[:space:]{;])(auth_basic_user_file|include|load_module|lock_file)([[:space:]]|$)" end=";"
color brightblue start="(^|[[:space:]{;])(pid|root|userid_path|working_directory)([[:space:]]|$)" end=";"
color brightblue start="(^|[[:space:]{;])(proxy|uwsgi)_ssl_(certificate(_key)?|trusted_certificate)([[:space:]]|$)" end=";"
color brightblue start="(^|[[:space:]{;])((proxy_|uwsgi_)?ssl_password|ssl_stapling)_file([[:space:]]|$)" end=";"
color brightblue start="(^|[[:space:]{;])ssl_((client_|trusted_)?certificate|certificate_key)([[:space:]]|$)" end=";"
color brightblue start="(^|[[:space:]{;])(auth_http|ssl_stapling_responder)([[:space:]]|$)" end=";"
color yellow start="(^|[[:space:]{;])fastcgi_split_path_info([[:space:]]|$)" end="(^|[^\]);"
color red "(^|[[:space:]{;])(auth_(basic_user_file|http)|fastcgi_split_path_info)([[:space:]]+|$)"
color red "(^|[[:space:]{;])(load_module|lock_file|pid|root|userid_path|working_directory)([[:space:]]+|$)"
color red "(^|[[:space:]{;])(proxy|uwsgi)_ssl_(certificate(_key)?|trusted_certificate)([[:space:]]+|$)"
color red "(^|[[:space:]{;])(proxy_|uwsgi_)?ssl_password_file|ssl_stapling_(file|responder)([[:space:]]+|$)"
color red "(^|[[:space:]{;])ssl_((client_|trusted_)?certificate|certificate_key|stapling_(file|responder))([[:space:]]+|$)"
# The 'include' directive should be highlighted as a macro because it includes other files
color red "(^|[[:space:]{;])include([[:space:]]+|$)"
color white "^[[:space:]]+"
color yellow "[{};]+"
color yellow "~[[:space:]]+(\\.|[^ ])+"
color yellow "\\."
color brightwhite "\<(on|off)\>"
color yellow "~[[:space:]]+"
color green ""(\\.|[^"])*"|'(\\.|[^'])*'"
color green start="'$" end="';$"
color blue "\$[A-Za-z][A-Za-z0-9_]*"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color brightwhite,cyan "\<TODO\>:?"
color brightwhite,cyan "\<FIXME\>:?"
color ,red "[[:space:]]+$"
color brightyellow " + +| + +"
# rainbow indent
color ,brightblack "^[[:space:]]{32}"
color ,black "^[[:space:]]{30}"
color ,brightblack "^[[:space:]]{28}"
color ,black "^[[:space:]]{26}"
color ,brightblack "^[[:space:]]{24}"
color ,black "^[[:space:]]{22}"
color ,brightblack "^[[:space:]]{20}"
color ,black "^[[:space:]]{18}"
color ,brightblack "^[[:space:]]{16}"
color ,black "^[[:space:]]{14}"
color ,brightblack "^[[:space:]]{12}"
color ,black "^[[:space:]]{10}"
color ,brightblack "^[[:space:]]{8}"
color ,black "^[[:space:]]{6}"
color ,brightblack "^[[:space:]]{4}"
color ,black "^[[:space:]]{2}"