Version-aware HAProxy language support for VS Code. Stop memorizing directive names, guessing valid options, and discovering config errors only when HAProxy refuses to start.
Full language support for HAProxy configuration files — recognized by name or by their section headers — with version-aware validation, intelligent autocompletion, and inline documentation right inside VS Code.
Built and maintained by Juan Torchia as part of GMM Software Solutions.
- Catch mistakes before reloads — unknown directives, wrong sections, undefined backends, deprecated options, and version mismatches show up while editing.
- Edit against the HAProxy version you run — validate configs for HAProxy 2.4 through 3.4 per workspace.
- Keep context in VS Code — completions, hover docs, snippets, formatting, folding, quick fixes, safe backend rename, find all references, and Outline navigation reduce trips to the manual.
If this extension helps you avoid HAProxy config mistakes, consider starring the repo so other operators can find it.
Every token in your HAProxy config gets meaningful color — section headers, directives, ACL names, backend references, IP addresses, ports, and timeouts.
Context-aware suggestions that know which directives are valid in each section. No more guessing whether use_backend belongs in a backend or a frontend.
- Filters by section type (
frontend,backend,global, etc.) - Respects
mode httpvsmode tcp— only shows relevant options - Deprecated directives shown with strikethrough
- Every suggestion includes signature and documentation
Select your HAProxy version and get real-time diagnostics tailored to it. Directives HAProxy no longer accepts, like reqrep? Flagged as errors. Options deprecated in 3.0? Flagged as warnings — with the exact migration path.
- Errors — unknown directives, wrong section, removed features, syntax issues
- Warnings — deprecated directives with upgrade hints
- Cross-references —
use_backendpointing to an undefined backend
Focused demo config: docs/demo-configs/09-undefined-backend.cfg
Hover over any directive for instant reference: signature, description, valid sections, version availability, and a direct link to the HAProxy docs.
Press F12 (or Ctrl+Click) on any backend name in a use_backend or default_backend directive to jump directly to its definition.
Navigate and refactor named HAProxy objects without hunting through the file by hand. Everything below works on the parsed config, not on text search, so a backend called api never matches api-v1 or a path like /api.
Put the cursor on a backend name — in its backend header or in any use_backend / default_backend line — and press F2. The new name is applied to the definition and every reference in one edit, so no use_backend line is left pointing at the old name.
Rename also works for ACLs, servers, named defaults, caches, userlists, resolvers, and peers. Negated ACL references such as !is_api keep the !. Press Ctrl+Enter in the rename box to preview the edit before applying it.
Focused demo config: docs/demo-configs/10-rename.cfg
Press Shift+F12 on a backend, ACL, or server name to peek every place it is defined and used, or Shift+Alt+F12 to list them in the References panel. Placing the cursor on a name also highlights its definition and all of its references in the editor, so you can see at a glance which frontends route to a backend before you change or remove it.
The Outline view and breadcrumbs list every section — global, defaults, frontend, backend, listen, userlist, and the rest — with their bind, acl, and server lines nested underneath. Press Ctrl+Shift+O (Cmd+Shift+O on macOS) to jump to any section or server by name in a large config.
Rename, references, highlights, and symbols stay inside the current configuration file. Review the resulting diff before reloading production HAProxy.
Collapse and expand individual HAProxy sections to focus on what matters.
Deprecated directives get a warning with a lightbulb quick fix. One click replaces the directive with the modern equivalent.
Start typing a section name and get a fully-formed boilerplate with tabstops. No more blank-page paralysis.
| Prefix | Inserts |
|---|---|
global |
Global block with logging, threads, stats socket |
defaults |
Defaults with all common timeouts |
frontend |
HTTP frontend |
frontend-ssl |
HTTPS frontend with SSL termination |
backend |
HTTP backend with health check |
backend-ssl |
HTTPS backend |
listen |
HAProxy stats listener |
acl |
ACL definition |
use_backend |
Conditional backend routing |
server |
Server line with health check params |
httpchk |
HTTP health check option |
One keypress (Shift+Alt+F) normalizes your entire config: section headers at column 0, directives indented consistently, blank lines cleaned up — without touching your comments or string values.
Validate your config against the exact HAProxy version running in production. Switch versions per workspace — no global settings that affect other projects.
| Version | Type | Status |
|---|---|---|
| 3.4 | LTS | ✅ Latest LTS |
| 3.3 | Stable | ✅ Supported |
| 3.2 | LTS | ✅ Recommended — default |
| 3.1 | Stable | |
| 3.0 | LTS | ✅ Supported |
| 2.8 | LTS | ✅ Critical fixes only |
| 2.6 | LTS | ✅ Critical fixes only |
| 2.4 | LTS |
The status bar shows your active version at all times. Click it to switch instantly.
Selecting a version that has reached end of life adds a warning diagnostic to the file, so an unsupported target is visible while editing rather than at upgrade time.
From VS Code:
- Open the Extensions panel (
Ctrl+Shift+X) - Search for
HAProxy Config - Click Install
From the command line:
code --install-extension gmm.gmm-haproxy-vscodeIn JetBrains IDEs (IntelliJ IDEA, PyCharm and other IDEs based on 2026.1 or later): install HAProxy Language Support from the JetBrains Marketplace. It runs this extension's language server, so validation and documentation are the same in both editors. It needs Node.js. Source: gmm-haproxy-jetbrains.
The extension recognizes haproxy.cfg, haproxy.conf, haproxy*.cfg and files under a haproxy/ directory automatically. Other .cfg and .conf files switch to HAProxy only when they contain an HAProxy section header (global, defaults, frontend, backend, listen, …) at the start of a line; nginx, Samba, setup.cfg and other formats keep their own language. If another extension (nginx, Apache) already claims .conf files, that language takes priority. A language you pick manually is kept for the session. To force HAProxy for a file, add it to files.associations:
"files.associations": { "**/lb/*.conf": "haproxy" }Product overview and support boundaries: gmmhub.net/products/haproxy-config-vscode
How to check an HAProxy config before reload, version by version: gmmhub.net/haproxy-config-check
All settings are available under File → Preferences → Settings → HAProxy.
| Setting | Default | Description |
|---|---|---|
haproxy.version |
3.2 |
HAProxy version to validate against |
haproxy.validate.enable |
true |
Enable/disable live validation |
haproxy.completion.enable |
true |
Enable/disable autocompletion |
haproxy.trace.server |
off |
LSP trace level (off / messages / verbose) |
haproxy.ratingPrompt.enabled |
true |
Occasionally ask for a Marketplace rating after regular use (at most twice) |
Per-workspace version — open .vscode/settings.json and add:
{
"haproxy.version": "2.8"
}This overrides the global setting for that workspace only, so different projects can validate against different HAProxy versions simultaneously.
| Command | Description |
|---|---|
HAProxy: Select Version |
Change validation version via QuickPick |
HAProxy: Restart Language Server |
Restart if the server gets into a bad state |
HAProxy is one of the most widely deployed load balancers in the world. But editing its config has always been a text-editor experience — no hints, no validation, no documentation. You either memorize the manual or keep a browser tab open.
This extension brings the config editing experience up to the same level as editing code:
- Catch errors before deployment — not when HAProxy refuses to reload
- Stay on the right version — avoid deploying directives that don't exist in your production binary
- Onboard faster — new team members get inline docs without needing to read the full manual
- Move faster — snippets and completion eliminate the boilerplate
- VS Code
1.110.0or newer - Node.js is not required on the target machine — the language server is bundled
Issues and pull requests are welcome at github.com/JuanTorchia/gmm-haproxy-vscode.
The most useful contributions are small and specific: missing directive metadata, sanitized real-world fixtures, version-specific validation tests, snippet improvements, and documentation that helps operators trust the extension.
Useful starting points:
- Roadmap — what is planned for v1.0 and later
- Discussions — share HAProxy editing pain points and help shape future milestones
- v0.3.0 milestone — current candidate work
- Good first issues — small, useful starter tasks
- Contributing guide — setup, tests, project layout, PR expectations
- Support — where to report bugs, request features, or ask questions
- Security policy — how to report vulnerabilities privately
To run locally:
git clone https://github.com/JuanTorchia/gmm-haproxy-vscode
cd gmm-haproxy-vscode
npm ci
npm ci --legacy-peer-deps --prefix client
npm ci --legacy-peer-deps --prefix server
npm run compileThen press F5 in VS Code to open an Extension Development Host with the extension loaded.
Before submitting a PR:
npm run lintmust passnpm run compilemust passnpm run test:unitmust pass for most changesnpm testmust pass before larger runtime or integration changes
If you use the Marketplace extension and notice missing HAProxy behavior, open an issue with a sanitized config snippet. Those reports directly improve completion, hover docs, and validation accuracy.
Rate / report issues — if the extension helps you, leave a review on the VS Code Marketplace or Open VSX; bugs and gaps go to GitHub issues.
See CHANGELOG.md.
MIT © Juan Torchia











