How to Customize Source Code Coloring in the DVT IDE for VS Code
Description
DVT allows you to easily follow the semantics of your source code at a glance. This video presents how you can easily tune the predefined coloring scheme of DVT.
https://code.visualstudio.com/docs/getstarted/themes#_customizing-a-color-theme
Explore the design and verification tools: https://www.dvteclipse.com
Or request a license: https://www.dvteclipse.com/request-license
This video was shot using DVT 23.1.9.
Transcript
Source Code Augmentation and Highlighting in DVT
DVT augments the source code presented in editors with various kinds of information extracted during the design and testbench compilation and elaboration. Both the syntax and semantics of the language are used for highlighting the code with colors and font styles.
Examples of Code Highlighting
Notice, for example, how module ports are distinctively colored in green versus signals in black. Furthermore, input ports are in italic fonts, making them easily distinguishable from output ports. Enum names, parameters, and preprocessing macros —broadly speaking, constants— are represented in boldface fonts.
Customizing Source Code Coloring
To customize coloring, from the Command Palette, open the Workspace Settings JSON.
Place the cursor on the language element you want to customize —for example, a static method call— and trigger the Inspect Editor Tokens and Scopes command.
If the semantic token type is present, edit in the editor.tokenColorCustomizations
section of the JSON settings file. Notice how the setting takes effect immediately.
If the semantic token type is not present, add the first entry of the textmate scopes in the editor.tokenColorCustomizations
section.
Further Details
For more details, check the link in the video description.