VS Code extension

NGINX Config for VS Code

Catch the mistakes nginx -t would refuse—a directive in the wrong block, the wrong number of arguments, proxy_pass without a scheme, an unclosed brace—while editing.

Open source and maintained by Juan Torchia.

Current release
v0.2.0
Marketplace downloads
94
Observed Dec 3, 2026
Compatibility
VS Code 1.110+ and Open VSX editors
License
MIT

See it in the editor

NGINX Config in VS Code flagging proxy_pass without a scheme, an unclosed server block, a directive outside its allowed context, a wrong argument count, and an unknown directive in the Problems panel
Diagnostics mirror what nginx -t would refuse, as you type.
Hover documentation for an nginx directive showing its syntax, default, allowed contexts, and module from nginx.org
Hover shows syntax, default, contexts, and module from nginx.org.
Completion list offering only the directives valid in the current nginx block
Completion offers only the directives valid in the current block.
Go to Definition from a proxy_pass target to the matching upstream block
Go to Definition jumps from proxy_pass to its upstream block.
An nginx server block after Format Document, re-indented by block depth with its comment kept in place
Formatting re-indents without joining, splitting, or removing lines.
Open in CertView CodeLens above an ssl_certificate directive in an nginx server block
Open in CertView appears above ssl_certificate when CertView is installed.

A focused tool for a specific workflow

NGINX configuration validation, context-aware completion, hover documentation from nginx.org, safe formatting, and TLS and certificate checks inside VS Code.

  • A language server with a catalog of all 841 directives of nginx and its official modules, generated from nginx.org with syntax, default, context, and module
  • Diagnostics for unknown directives, directives outside their allowed block, wrong argument counts, proxy_pass without a scheme, unclosed blocks, and missing semicolons
  • Context-aware completion for http, server, location, upstream, stream, mail, and other blocks, and hover documentation from nginx.org
  • A formatter that only re-indents and trims trailing whitespace: it never joins, splits, adds, or removes lines
  • Follow include directives and jump from proxy_pass and other *_pass directives to the matching upstream block
  • TLS lint against the Mozilla Server Side TLS guidelines, certificate details for referenced files, and an Open in CertView CodeLens

From install to a safer decision

  1. Install the extension and open nginx.conf, a file under sites-available, sites-enabled, or conf.d, or any file set to the NGINX language.
  2. Review inline diagnostics and use context-aware completion, hover documentation, and Go to Definition for includes and upstreams while editing.
  3. Check TLS and certificate findings for ssl_* directives, and open referenced certificates in CertView when it is installed.
  4. Run nginx -t and your deployment validation before reloading the server.

How the pieces fit together

This is a textual architecture map grounded in the public implementation. Follow the source link to inspect the exact modules, tests, and release history.

  1. The VS Code client activates for NGINX configuration files and owns editor commands, settings, and the Open in CertView CodeLens.

  2. The client exchanges Language Server Protocol messages with a bundled language server that parses the document and resolves include and upstream references across the workspace.

  3. The server checks directives against the generated nginx.org catalog and a Mozilla TLS catalog pinned to guideline 6.0, and reads referenced certificate and key files with Node's built-in crypto.

Inspect the implementation on GitHub

Supported scope

  • nginx.conf, nginx*.conf, *.nginx, and *.nginxconf
  • Files under sites-available, sites-enabled, conf.d, or an nginx folder, recognized as include fragments
  • fastcgi_params, scgi_params, uwsgi_params, and proxy_params
  • Certificates and keys referenced by ssl_certificate and related directives

Explicit boundaries

  • Diagnostics are editor feedback, not a substitute for running nginx -t against the target build and modules before reload or deployment.
  • The extension has no telemetry and no network access. Certificate and key files outside the workspace are read only after opting in, and private key content is never shown or sent anywhere.
  • When filing public issues, use a minimal sanitized configuration and remove hosts, addresses, credentials, certificates, and other production details.
Read the security policy

Get help, verify changes, or contribute

Issues and release history stay with the source repository so the evidence remains public.

Need this kind of workflow inside your team?

Start with a bounded workflow review. Product support stays in public issues; organization-specific discovery and implementation follow a private path.

Review the engagement