Skip to content

Code formatter

Gonzalo Larumbe edited this page Feb 19, 2023 · 11 revisions

verilog-ext will automatically configure apheleia code-formatting package.

Installation

  • Download verible tools: verible-verilog-format
  • Make them available to the $PATH

Shell commands example:

# Download latest release (0.0-2492 at the time of writing)
VERIBLE_GITHUB_URL=https://github.com/chipsalliance/verible
LATEST_RELEASE_URL=releases/download/v0.0-2492-gd122fac8 
LATEST_RELEASE_FILE=verible-v0.0-2492-gd122fac8-Ubuntu-22.04-jammy-x86_64.tar.gz 
cd ~/Downloads
curl -L -o $LATEST_RELEASE_FILE $VERIBLE_GITHUB_URL/$LATEST_RELEASE_URL/$LATEST_RELEASE_FILE
tar xvzf $LATEST_RELEASE_FILE
cd verible-*/bin
export PATH=$PWD:$PATH

Usage

  • To format current buffer: C-c C-l to runverilog-ext-code-format
  • To automatically format buffer after saving just enable apheleia-mode: M-x RET apheleia-mode RET
Clone this wiki locally