Skip to content

gasrodriguez/veridian

 
 

Repository files navigation

veridian

build GitHub

A SystemVerilog Language Server

Installation

Pre-Installation

  • It is recommended to install the verible tools for
    • formatting support with verible-verilog-format
    • syntax checking support with verible-verilog-syntax

Install from Release

  • Download the latest release for your OS from the releases page
    • The nightly release contains the last successful build, and is not guaranteed to be stable
    • The ubuntu build also includes slang for linting

Install from Source

  • Build dependencies: Rust toolchain
  • optional: C++17 compatible compiler (for linting with slang)
# clone the repo
git clone https://github.com/vivekmalneedi/veridian.git
# install with slang feature, if C++17 compiler is available
cargo install --path veridian --all-features
# install if C++17 compiler is not available
cargo install --path veridian

Usage

  • download veridian.vsix from the latest release
  • install the extension using one of the two following methods
    • In the extensions tab, click on the 3 dots, then click Install from VSIX and choose veridian.vsix
    • Run code --install-extension veridian.vsix

In coc-settings.json:

{
  "languageserver": {
    "veridian": {
      "command": "veridian",
      "filetypes": ["systemverilog", "verilog"]
    }
}

The full list is on the wiki and includes configuration for the neovim built-in lsp client

Configuration

  • Specify source directories and include directories using a yaml project config
  • All settings have defaults so your config file should only specify custom values

In veridian.yml:

# list of directories with header files
include_dirs:
  - inc1
  - inc2
# list of directories to recursively search for SystemVerilog/Verilog sources
source_dirs:
  - src
  - src2
# if true, recursively search the working directory for files to run diagnostics on
# default: true
auto_search_workdir: true|false,
# verible tool configuration
verible:
  # verible-verilog-syntax configuration
  syntax:
    # default: true if in path
    enabled: true|false,
    path: "verible-verilog-syntax"
    # default: none
    args:
        - arg1
        - arg2
  # verible-verilog-format configuration
  format:
    # default: true if in path
    enabled: true|false,
    path: "verible-verilog-format"
    # default: none
    args:
        - arg1
        - arg2
# set log level
# default: Info
log_level: Error|Warn|Info|Debug|Trace

LSP Support

See the LSP Specification for more details

  • diagnostics (using slang or verible)
  • completion
    • identifier completion
    • dot completion
    • keywords & snippets
    • system task/function and compiler directives
  • hover (documentation)
  • definition
  • documentSymbol
  • documentHighlight
  • formatting (using verible)
  • rangeFormatting (using verible)

About

A SystemVerilog Language Server

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 93.3%
  • C++ 4.6%
  • SystemVerilog 0.9%
  • TypeScript 0.7%
  • JavaScript 0.2%
  • Dockerfile 0.2%
  • C 0.1%