Formats nginx config without breaking it, and flags the traps that cause outages.
Safe format. The formatter prints from a parse tree. Before applying any change, it parses its own output again. If that tree differs from your file's in any way, it changes nothing and shows a warning. Comments (inline or on their own line), multi-line log_format strings, quoted args, ${var} and escaped regex braces all come through as they were. Bodies of *_by_lua_block blocks are never touched.
Features (Lite, free)
- Syntax highlighting for
nginx.conf, *.nginx, **/nginx/**/*.conf, sites-available/, sites-enabled/, conf.d/*.conf
- Safe Format Document, also used as the default nginx formatter. Indent is set with
nginxStudio.format.indent (a number or "tab").
- Hover and completion from a bundled table of about 260 directives (core, stream, mail, HTTP/3, gRPC, njs, OpenResty), giving context, syntax, default and a short summary
- Outline view of
http, server (labelled by server_name), location, upstream and other blocks
- 8 lint rules, checked as you type:
| Rule |
What it catches |
missing-semicolon |
listen 80 with no ;, so the next line gets swallowed as an argument |
unbalanced-braces |
an unclosed { or a stray } |
unknown-directive |
typos such as proxy_pas (warning, since third-party modules exist) |
wrong-context |
e.g. listen inside http, or worker_processes inside server |
duplicate-location |
the same location match defined twice in one block |
duplicate-server-name |
the same server_name + listen pair in two server blocks |
proxy-pass-uri |
trailing-slash mismatches, and a URI part in a regex/named location |
add-header-inheritance |
a child add_header that silently drops the parent's security headers |
Lite vs Pro
|
Lite (free) |
Pro ($12, coming) |
| Highlighting, safe format, hover/completion, outline |
✓ |
✓ |
| 8 lint rules |
✓ |
✓ |
| Location match simulator (URL → location, with reason trace) |
|
✓ |
| Include graph / glob resolution |
|
✓ |
| Extra security checks, custom rule severity, explain server block |
|
✓ |
The Pro commands appear in the palette now. Running them only shows a "Pro coming" notice.
Privacy
It runs 100% offline. There are no network requests and no telemetry, and it never runs the nginx binary or any other process. It also never writes files: format returns a normal editor edit that you can undo.
Zecro LLC (Washington) · Support: bhamlefty@gmail.com
Known limits
unknown-directive is a warning: directives from third-party modules not in the table are flagged but never blocking.
- Document format only (no range format yet). Blank-line runs collapse to one. Lua block bodies are kept verbatim.
- Lint does not follow
include files (include resolution is a Pro feature).
Feedback
Bugs and ideas: bhamlefty@gmail.com · https://zecro-nginx-config-studio.pages.dev/
| |