-
-
Notifications
You must be signed in to change notification settings - Fork 7
Syntax highlighting
Gonzalo Larumbe edited this page Jun 6, 2023
·
4 revisions
verilog-ext
provides many faces that inherit from existing ones in
Emacs 29. This is done in order to avoid having default faces that
might not be suitable for different themes. The drawback is that if
you are using an older version many of the faces will not be displayed by default.
However this can be customized with very little configuration.
First make sure that font-lock
has been included in verilog-ext-feature-list
before running verilog-ext-mode-setup
.
There are two methods to configure faces:
-
Via M-x
customize-group
RETverilog-ext-faces
.- Customize faces and save configuration once you get the desired result
-
Through elisp code
- Below there is a snippet with a configuration example that works well with a dark background:
(set-face-attribute 'verilog-ext-font-lock-grouping-keywords-face nil :foreground "dark olive green") (set-face-attribute 'verilog-ext-font-lock-punctuation-face nil :foreground "burlywood") (set-face-attribute 'verilog-ext-font-lock-operator-face nil :foreground "burlywood" :weight 'extra-bold) (set-face-attribute 'verilog-ext-font-lock-brackets-face nil :foreground "goldenrod") (set-face-attribute 'verilog-ext-font-lock-parenthesis-face nil :foreground "dark goldenrod") (set-face-attribute 'verilog-ext-font-lock-curly-braces-face nil :foreground "DarkGoldenrod2") (set-face-attribute 'verilog-ext-font-lock-port-connection-face nil :foreground "bisque2") (set-face-attribute 'verilog-ext-font-lock-dot-name-face nil :foreground "gray70") (set-face-attribute 'verilog-ext-font-lock-braces-content-face nil :foreground "yellow green") (set-face-attribute 'verilog-ext-font-lock-width-num-face nil :foreground "chartreuse2") (set-face-attribute 'verilog-ext-font-lock-width-type-face nil :foreground "sea green" :weight 'bold) (set-face-attribute 'verilog-ext-font-lock-module-face nil :foreground "green1") (set-face-attribute 'verilog-ext-font-lock-instance-face nil :foreground "medium spring green") (set-face-attribute 'verilog-ext-font-lock-time-event-face nil :foreground "deep sky blue" :weight 'bold) (set-face-attribute 'verilog-ext-font-lock-time-unit-face nil :foreground "light steel blue") (set-face-attribute 'verilog-ext-font-lock-preprocessor-face nil :foreground "pale goldenrod") (set-face-attribute 'verilog-ext-font-lock-modport-face nil :foreground "light blue") (set-face-attribute 'verilog-ext-font-lock-direction-face nil :foreground "RosyBrown3") (set-face-attribute 'verilog-ext-font-lock-typedef-face nil :foreground "light blue") (set-face-attribute 'verilog-ext-font-lock-translate-off-face nil :background "gray20" :slant 'italic) (set-face-attribute 'verilog-ext-font-lock-uvm-classes-face nil :foreground "light blue") (set-face-attribute 'verilog-ext-font-lock-xilinx-attributes-face nil :foreground "orange1")