The language server can be hooked up to your IDE or text editor to provide assistance while programming. It helps highlight syntax errors or lint violations and provides fixes for issues if they are available.
The language server is part of the Verible suite and called verible-verilog-ls
.
There are a few changes in the review pipeline, so here is the current progress
.rules.verible_lint
instead of all enabledAfter installing the verible tools, you can configure your editor to use the language server.
This will be specific to your editor. In essence, you need to tell it to start the verible-verilog-ls
language server whenever it works with Verilog or SystemVerilog files.
Here are a few common editors, but there are many more that support language servers. If you have configured it for your editor, consider sending a pull request that adds a section to this README (or file an issue an mention what you had to do and we add it here).
In alphabetical order
The lsp-mode
needs to be installed from wherever you get your emacs packages.
Here is a simple setup: put this in your ~/.emacs
file and make sure the binary is in your $PATH
(or use full path).
(require 'lsp-mode) (add-to-list 'lsp-language-id-configuration '(verilog-mode . "verilog")) (lsp-register-client (make-lsp-client :new-connection (lsp-stdio-connection "verible-verilog-ls") :major-modes '(verilog-mode) :server-id 'verible-ls)) (add-hook 'verilog-mode-hook 'lsp)
https://docs.kde.org/trunk5/en/kate/kate/kate-application-plugin-lspclient.html
First, enable LSP by checking Settings > Configure Kate > Plugins > LSP Client
Then, there is a new {} LSP Client
icon appearing on the left of the configure dialog. In the User Server Settings tab, enter the lsp server configuration to get it started up on our Verilog/SystemVerilog projects.
{ "servers": { "verilog": { "command": ["verible-verilog-ls"], "root": "", "url": "https://github.com/chipsalliance/verible" }, "systemverilog": { "command": ["verible-verilog-ls"], "root": "", "url": "https://github.com/chipsalliance/verible" } } }
Make sure to have version 0.5.0
or newer and install the nvim-lpsconfig plugin. Enable the verible config:
-- init.lua require'lspconfig'.verible.setup {}
See https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#verible for configuration options.
Consult https://lsp.readthedocs.io/
Installation steps
Tools > Install Package control...
Preferences > Package Control
search for Install Package
. Confirm, then search for LSP
.SystemVerilog
package, which gives you general syntax highlighting.Preferences > Package Settings > LSP > Settings
. It opens a global setting file and a user setting skeleton. Put the following in your user LSP.sublime-settings
; it already provides the empty outer braces, you need to add the "clients"
section.// Settings in here override those in "LSP/LSP.sublime-settings" { "clients": { "verible-verilog-ls": { "command": ["verible-verilog-ls"], "enabled": true, "selector": "source.systemverilog" } } }
There is a Tools > LSP > Troubleshoot Server Configuration
which might be helpful in case of issues.
TBD. What I found so far, there is vim-lsp that can be used. There is also neovim.
In the vscode/ subdirectory, you find instructions how to build and install an extension for VSCode.