Skip to content

Typedefs

Gonzalo Larumbe edited this page Jun 1, 2023 · 4 revisions

Configuration

First make sure that typedefs has been included in verilog-ext-feature-list before running verilog-ext-mode-setup.

Then, it is needed to set workspace variables for file parsing and gather project typedefs through one of these methods:

  • M-x verilog-ext-workspace-typedef-update RET
  • M-x verilog-ext-workspace-typedef-update-async RET

A typedef database will be created and cached for future sessions.

At this point, two new things should be working:

  • User types and class object declarations should be highlighted
  • Running verilog-pretty-declarations should also align these types

Background

This feature automates the process of extracting typedefs/classes from a set of files in directories and update variables to improve syntax highlighting and declaration alignment.

By default verilog-pretty-declarations and verilog-pretty-expr will only align built-in types. If you want it to also work on user defined types it is needed to specify which are those types. This feature automates the process of extracting current workspace typedefs.

Clone this wiki locally