Usage in VS Code
Open a Verilog or SystemVerilog file. LazyVerilog starts on its own. Not installed yet? See Install for VS Code.
Hover, go to definition, find references, rename, completion, and signature help use VS Code's standard shortcuts. Code actions (Ctrl+.) offer AutoInst, AutoWire, AutoArg, AutoFunc, and AutoFF when the cursor is on a supported construct, and quick fixes for some lint diagnostics. Outside a class, the menu also offers Insert always_ff block and Insert always_comb block, which insert an empty template at the cursor line.
Commands
Open the Command Palette with Ctrl+Shift+P:
| Command | Description |
|---|---|
LazyVerilog: Format Document | Format the file |
LazyVerilog: Lint Current File | Show diagnostics for the file |
LazyVerilog: Lint All Files | Show diagnostics for all indexed project files |
LazyVerilog: Show RTL Hierarchy | Open the module hierarchy |
LazyVerilog: Show RTL Hierarchy (Reverse) | Open the reverse hierarchy from the current module |
LazyVerilog: Refresh RTL Tree | Rebuild the tree shown in the RTL Hierarchy view |
LazyVerilog: Interface | Inspect and edit instance connections (Interface) |
LazyVerilog: Connect | Connect two modules through the hierarchy (Connect) |
Formatting
Format Document (Shift+Alt+F) and LazyVerilog: Format Document always format. Saving formats only when [format].enable_format_on_save = true is set in lazyverilog.toml: the server formats in textDocument/willSaveWaitUntil, which VS Code sends on every save, so editor.formatOnSave is not needed. If you also turn on editor.formatOnSave for these files, a save formats twice (the second pass changes nothing).