AutoVSG: Live VHDL Style Checking in VS Code
Check VHDL style as you write. AutoVSG runs VHDL Style Guide (VSG) against the
unsaved editor buffer and reports errors and warnings in the Problems panel.
Install
Install AutoVSG from the Visual Studio Marketplace
or search for AutoVSG by publisher DSPiz in VS Code's Extensions view.
Open a VHDL file in a trusted workspace. If VSG is missing, click Install
VSG in the first-run notification. Diagnostics appear automatically after a
short pause while typing; no lint commands or tasks are needed.
Requirements
- Python 3.9 or newer, with
venv support, and internet access for first-run
setup. No separate pip command is required. If Python is missing, install it
from https://www.python.org/downloads/, restart VS Code, and run
AutoVSG: Install VSG Engine.
- Existing VSG installations on
PATH or in an ancestor .venv are also
supported and do not require managed setup.
- Project configuration is optional. Starting in the VHDL file's folder,
AutoVSG checks that folder and up to seven parent folders for
vsg-config.yml or vsg-config.yaml, using the nearest file it finds. If no
config is found, VSG still runs with its built-in default rules.
Setup downloads VSG 3.35.0 from PyPI into private extension storage. It does not
change project or system Python packages. Setup requires your confirmation and
runs only in trusted workspaces. To retry a failed setup, run AutoVSG: Install
VSG Engine. Failure details are available in the AutoVSG output channel.
Dependencies
AutoVSG includes the editor integration and setup helper. Python, VSG, and
PyYAML are installed separately; the VSG engine is downloaded on first use.
| Dependency |
Required for |
How it is provided |
| Desktop VS Code 1.140.0 or newer |
Running the extension |
Installed by the user; supplies the extension's Node.js runtime. |
| Python 3.9 or newer |
Managed engine setup and running its VSG installation |
Installed separately; AutoVSG does not download Python. |
Python venv and pip |
Creating the private engine environment and installing packages |
Supplied by Python; some Linux distributions require separate venv/pip packages. |
| VSG 3.35.0 |
Checking VHDL style rules |
Downloaded by one-click setup, or use an existing VSG installation. |
| PyYAML 5.1 or newer |
VSG's YAML configuration support |
Installed automatically by pip as a VSG dependency. |
| Internet access |
Downloading VSG and dependencies during setup |
Required for first-time managed setup; linting works offline afterwards. |
VSG 3.35.0 itself declares Python >=3.8; AutoVSG's managed installer requires
Python >=3.9. PyYAML is not pinned to an exact version by AutoVSG. Existing VSG
installations use their own Python environment and dependencies.
No separate Node.js, npm, compiler, or VHDL simulator installation is needed to
use AutoVSG. The extension has no runtime npm dependencies.
Designed for desktop VS Code on Windows, macOS, and Linux. Tested on macOS only;
Windows and Linux support has not yet been verified end to end. Browser-only
VS Code is not supported because AutoVSG starts a local process.
The current installer uses py -3 or python on Windows, and python3 or
python on macOS/Linux. The interpreter must be discoverable on VS Code's
process PATH. The managed virtual environment depends on that Python
installation remaining available.
Fully install-and-run distribution without a separate Python prerequisite
would require bundling Python, VSG, PyYAML, and their licenses in tested
OS/architecture-specific packages. That is not included in this release.
Settings
autovsg.executable: Optional VSG command or absolute path override. The
default uses the private engine, then ancestor .venv folders, then PATH.
autovsg.configuration: Optional VSG YAML/JSON configuration path. Empty
uses the automatic search described above.
autovsg.runOnType: Run after edits. Defaults to true.
autovsg.debounceMilliseconds: Delay after the last edit. Defaults to
500 ms.
Use an external config
To use a shared config file instead of auto-discovery:
In VS Code, open the Command Palette and run Preferences: Open Workspace
Settings (JSON).
Add autovsg.configuration to the JSON object:
{
"autovsg.configuration": "../shared/vsg-config.yml"
}
The path is relative to the workspace root; an absolute path also works. This
setting overrides automatic config discovery.
Use AutoVSG: Check Current VHDL File from the Command Palette to run an immediate
check.
Development
Contributors need Node.js and npm. npm install installs the development tools:
TypeScript, ESLint, typescript-eslint, VS Code/Node/Mocha type definitions, and
the VS Code extension test CLI/Electron runner. These are not bundled runtime
dependencies. The test runner downloads VS Code on its first run, and the
integration test requires an available VSG installation and project config.
Run npm test to compile, lint, and test the extension, including an
extension-host check against the project VSG configuration. Open this folder in
VS Code and press F5 to launch an Extension Development Host.