This package includes some extensions on top of the great Emacs vhdl-mode
.
- Tree-sitter powered
vhdl-ts-mode
- Improve syntax highlighting
- LSP configuration for
lsp-mode
andeglot
- Additional options for
flycheck
linters - Improve
imenu
, detect instances - Navigate through instances in a entity
- Jump to definition/reference of entity at point
- Templates insertion via
hydra
vhdl-ext
is available on MELPA.
See Getting Started for instructions on how to setup and download packages.
vhdl-ts-mode
is not yet available on MELPA. See notes for more info.
To install it via straight with use-package
:
(straight-use-package 'use-package)
(use-package vhdl-ext
:straight (:host github :repo "gmlarumbe/vhdl-ext"
:files ("vhdl-ext.el" "vhdl-ts-mode.el"")))
First download vhdl-ext
in the desired directory (e.g. ~/.emacs.d
):
$ cd ~/.emacs.d
$ git clone https://github.com/gmlarumbe/vhdl-ext
And add the following snippet to your .emacs
or init.el
:
(add-to-list 'load-path (expand-file-name "~/.emacs.d/vhdl-ext"))
(require 'vhdl-ext)
The most basic configuration just requires setup of the minor-mode and to add it as a hook for vhdl-mode
:
(vhdl-ext-mode-setup)
(add-hook 'vhdl-mode-hook #'vhdl-ext-mode)
If installed and loaded via use-package
:
(use-package vhdl-ext
:after vhdl-mode
:demand
:hook ((vhdl-mode . vhdl-ext-mode))
:config
(vhdl-ext-mode-setup))
Enabling of vhdl-ext-mode
minor-mode creates the following keybindings:
- C-M-u
vhdl-ext-find-entity-instance-bwd
- C-M-d
vhdl-ext-find-entity-instance-fwd
- C-M-.
vhdl-ext-jump-to-parent-entity
- C-c M-.
vhdl-ext-jump-to-entity-at-point-def
- C-c M-?
vhdl-ext-jump-to-entity-at-point-ref
- C-c C-t
vhdl-ext-hydra/body
The package provides the major-mode vhdl-ts-mode
for syntax highligting and indentation. It is derived from vhdl-mode
making all vhdl-mode
functionality still available.
vhdl-ts-mode
is still work in progress and aims to provide the same functionality as vhdl-ext
but much faster and efficiently.
For more information see the wiki.
For face customization: M-x customize-group
RET vhdl-ext-faces
Auto-configure various VHDL language servers for lsp-mode
and eglot
:
For configuration instructions, see the wiki.
Enhanced version of GHDL flycheck checker.
- Allows setting name of current work library name, e.g:
(setq vhdl-ext-flycheck-ghdl-work-lib (vhdl-work-library))
- Automatically include directories of open VHDL buffers
- Variable
vhdl-ext-flycheck-ghdl-include-path
will be updated every time a new VHDL file is opened
- Variable
Support detection of instances
- Navigate instances inside an entity
- Jump to definition/references of entity at point
- Jump to parent entity
For detailed info see the wiki.
Snippet selection via hydra
.
vhdl-ext-hydra/body
: C-c C-t
Contributions are welcome! Just stick to common Elisp conventions and run the ERT suite after testing your changes and before submitting a new PR.
For new functionality add new ERT tests if possible.
To run the whole ERT test suite change directory to the vhdl-ext
root and run the test
target:
$ cd ~/.emacs.d/vhdl-ext
$ make test
To run a subset of tests (e.g. imenu):
$ cd ~/.emacs.d/vhdl-ext
$ tests/scripts/ert-tests.sh recompile_run imenu::
- verilog-ext: SystemVerilog Extensions for Emacs
- Analog package to edit Verilog/SystemVerilog sources