HAProxy Config — VS Code ExtensionVersion-aware HAProxy language support for VS Code. Stop memorizing directive names, guessing valid options, and discovering config errors only when HAProxy refuses to start.
Built and maintained by Juan Torchia as part of GMM Software Solutions. Why DevOps and SRE teams use it
If this extension helps you avoid HAProxy config mistakes, consider starring the repo so other operators can find it. FeaturesSyntax HighlightingEvery token in your HAProxy config gets meaningful color — section headers, directives, ACL names, backend references, IP addresses, ports, and timeouts.
Intelligent AutocompletionContext-aware suggestions that know which directives are valid in each section. No more guessing whether
Version-Aware ValidationSelect your HAProxy version and get real-time diagnostics tailored to it. Directives HAProxy no longer accepts, like
Focused demo config:
Hover DocumentationHover over any directive for instant reference: signature, description, valid sections, version availability, and a direct link to the HAProxy docs.
Go-to-DefinitionPress
Rename Backend, Find All References, and OutlineNavigate 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 Rename a backend safely (
|
| 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 |
Document Formatting
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.
Multi-Version HAProxy Support
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 | ⚠️ End of life |
| 3.0 | LTS | ✅ Supported |
| 2.8 | LTS | ✅ Critical fixes only |
| 2.6 | LTS | ✅ Critical fixes only |
| 2.4 | LTS | ⚠️ End of life |
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.
Installation
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-vscode
In 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
Configuration
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.
Commands
| Command | Description |
|---|---|
HAProxy: Select Version |
Change validation version via QuickPick |
HAProxy: Restart Language Server |
Restart if the server gets into a bad state |
Why this extension?
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
Requirements
- VS Code
1.110.0or newer - Node.js is not required on the target machine — the language server is bundled
Contributing
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 compile
Then 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.
Changelog
See CHANGELOG.md.
License
MIT © Juan Torchia










