Skip to content
Adrian Byszuk edited this page Jan 19, 2019 · 3 revisions

VHDL

The rust_hdl language server is still under heavy development. As of now (Jan. 2019) it allows only for syntax checking and very basic semantic analysis.

Installing server

As the server name implies, it's written in Rust so you must have Rust toolchain installed.
After compilation you have to manually add binaries to your $PATH. My choice is to put them in '/usr/local/bin'.

git clone https://github.com/kraigher/rust_hdl.git
cd rust_hdl
cargo build --release
sudo cp target/release/vhdl_ls /usr/local/bin
sudo cp target/release/vhdl_parser /usr/local/bin

Registering in .vimrc

Here's an example that shows how to manually setup a language server for TypeScript.

if executable('vhdl_ls')
    au User lsp_setup call lsp#register_server({
        \ 'name': 'vhdl_ls',
        \ 'cmd': {server_info->['vhdl_ls']},
        \ 'root_uri':{server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), 'vhdl_ls.toml'))},
        \ 'whitelist': ['vhdl'],
        \ })
endif

Keep in mind that vhdl_ls requires vhdl_ls.toml file for proper operation in large projects.