NGINX Config — VS Code Extensionnginx configuration support that actually lints. Catch the mistakes Works in VS Code and every Open VSX editor (VSCodium, Cursor, Windsurf, Gitpod, Eclipse Theia). Built and maintained by Juan Torchia as part of GMM Software Solutions.
Why another nginx extensionThe popular nginx extensions highlight syntax and stop there; most have not been updated in years and none checks directives against the documentation. This one ships a language server with a catalog of all 841 directives of nginx and its official modules (generated from nginx.org: syntax, default, context, module), and uses it to validate, complete and document your config. It was tuned against more than 450 real-world configs (Debian/Ubuntu defaults, the official Docker image, Certbot, h5bp, Mastodon, Discourse, Nextcloud, linuxserver's 400+ reverse-proxy confs, OpenResty) so that valid configs produce zero diagnostics. FeaturesValidation that mirrors
|
| Check | Severity | Example |
|---|---|---|
| Unknown directive | Warning | proxy_read_timout 60s; |
| Directive not allowed in this block | Error | worker_processes inside server |
| Invalid number of arguments | Error | root /srv/a /srv/b;, or a missing ; that merges two lines |
Block directive without { }, or { } on a simple directive |
Error | server; |
proxy_pass without http:// / https:// |
Error | proxy_pass backend:8080; (stream proxy_pass is left alone) |
Unclosed blocks, stray }, missing ;, unterminated quotes |
Error | |
| Certificate or key file not found | Information | ssl_certificate /etc/nginx/ssl/site.pem; — switch off with nginx.validate.missingCertificates |
Contexts follow the docs exactly, including http vs stream vs mail (server, listen and proxy_pass mean different things in each), if in location, limit_except and upstream. Files meant to be included (sites-available/*, conf.d/*.conf, snippets) are recognised as fragments: their top level is not checked against the main context, and stream fragments are detected automatically.
Directives of common third-party modules (Lua/OpenResty, headers-more, Brotli, Passenger, ModSecurity, GeoIP2, VTS, set-misc, …) are never reported, Lua blocks are skipped verbatim, and you can add your own module's directives to nginx.validate.ignoredDirectives.
Hover docs from nginx.org

Syntax, default, allowed contexts, module, the version it appeared in, an NGINX Plus only badge where it applies, and the start of the official description with a link to the full page. Ambiguous names (server, listen, proxy_pass) show the variant for the block you are in.
Context-aware completion

Only the directives valid in the current block (http, server, location, upstream, events, stream, mail, if, limit_except), with snippets for blocks and on | off choices. After proxy_pass, fastcgi_pass, grpc_pass, … it offers the upstreams defined in the file.
Navigation

- Go to definition on
proxy_pass http://backend(and the other*_passdirectives) jumps toupstream backend { }, in the same file or anywhere in the workspace. - Follow
include: Ctrl/Cmd+click opens the file; go to definition on a glob (include conf.d/*.conf;) lists every match. Relative paths resolve against the nginx prefix (the folder holdingnginx.conf), and absolute production paths such as/etc/nginx/sites-enabled/*are also looked up inside your workspace. error_page … @fallbackandtry_files … @appjump to the named location.- Outline and breadcrumbs for every block, with
server_nameandlistenshown next to eachserver. - Folding for blocks and comment runs.
A formatter that never deletes lines

Format Document only re-indents by block depth and trims trailing whitespace. It never joins, splits, adds or removes lines, never touches the text of comments, multi-line strings or Lua code, and running it twice changes nothing. It is tested for exactly that on every fixture and on 560+ real configs.
Open certificates in CertView

With the free CertView extension installed, an Open in CertView CodeLens appears above ssl_certificate, ssl_trusted_certificate, ssl_client_certificate and their proxy_/grpc_/uwsgi_ variants. One click shows the subject, SANs, validity, chain and lint findings of the certificate nginx will serve.

Certificate and include paths are also clickable links.
Syntax highlighting and snippets

TextMate grammar for directives, blocks, location modifiers and patterns, variables ($host, ${var}), strings, key=value parameters, numbers with units, comments and embedded Lua. Snippets: server-proxy, server-static, location-php, upstream, map-websocket.
File detection
The nginx language is used for nginx.conf, nginx*.conf, *.nginx, *.nginxconf, fastcgi_params, fastcgi.conf, scgi_params, uwsgi_params, proxy_params, and any file under sites-available/, sites-enabled/, conf.d/*.conf or an nginx/ folder. For other names, pick NGINX in the language picker or add a files.associations entry:
"files.associations": { "*.conf.template": "nginx" }
Files that match a pattern but are clearly not nginx (Apache, Dovecot, rspamd, syslog-ng under conf.d/) get no diagnostics.
Settings
| Setting | Default | Description |
|---|---|---|
nginx.validate.enable |
true |
Live diagnostics. |
nginx.validate.unknownDirectives |
true |
Warn about directives outside nginx and its official modules. |
nginx.validate.ignoredDirectives |
[] |
Directive names never reported as unknown (third-party modules). |
nginx.validate.missingCertificates |
true |
Report certificate/key files that cannot be found locally (information). |
nginx.completion.enable |
true |
Context-aware completion. |
nginx.certView.codeLens |
true |
Show Open in CertView when CertView is installed. |
nginx.trace.server |
off |
Language server protocol tracing. |
Privacy
No telemetry, no network access. The extension reads the nginx files you open, other nginx files in your workspace (to find upstream blocks) and checks whether referenced certificate files exist — it never reads their contents.
Development
npm ci && npm ci --prefix client && npm ci --prefix server
npm run build
npm test # unit + integration (integration needs a display, e.g. xvfb-run)
npm run catalog:generate # refresh the directive catalog from nginx.org
See docs/development.md and docs/architecture.md.

