Skip to content

Commit 0301a93

Browse files
authored
Add the verible language server for Verilog (#4247)
Fixes #4023
1 parent 02c5ba5 commit 0301a93

File tree

4 files changed

+32
-2
lines changed

4 files changed

+32
-2
lines changed

CHANGELOG.org

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@
167167
* Reorganized lsp-mode code moving features and clients to separated files. #2067
168168
* Add support for signatureHelp using ~posframe~. #1999
169169
* Add ~iedit~ integration. #2478
170+
* Add client for Verible SystemVerilog language Server ([[https://github.com/chipsalliance/verible]])
170171

171172
** Release 7.0.1
172173
* Introduced ~lsp-diagnostics-mode~.

clients/lsp-verilog.el

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@
2020
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
2121

2222
;;; Commentary:
23-
;; LSP client support for Verilog/SystemVerilog. Two language servers
24-
;; are available:
23+
;; LSP client support for Verilog/SystemVerilog. The following language
24+
;; servers are available:
2525
;; 1) HDL Checker. See https://github.com/suoto/hdl_checker
2626
;; 2) SVLangserver. See https://github.com/imc-trading/svlangserver
27+
;; 3) Verible. See https://github.com/chipsalliance/verible
2728
;;
2829
;; This file is based on the lsp-vhdl.el file.
2930
;;
@@ -190,5 +191,23 @@
190191

191192
(lsp-consistency-check lsp-verilog)
192193

194+
(defgroup lsp-verible nil
195+
"LSP support for Verilog/SystemVerilog using the Verible suite."
196+
:group 'lsp-mode
197+
:link '(url-link "https://github.com/chipsalliance/verible"))
198+
199+
(defcustom lsp-clients-verible-executable '("verible-verilog-ls")
200+
"Command to start the Verible Verilog language server."
201+
:group 'lsp-verible
202+
:risky t
203+
:type 'file)
204+
205+
(lsp-register-client
206+
(make-lsp-client :new-connection (lsp-stdio-connection lsp-clients-verible-executable)
207+
:major-modes '(verilog-mode)
208+
:language-id "verilog"
209+
:priority -2
210+
:server-id 'lsp-verilog-verible))
211+
193212
(provide 'lsp-verilog)
194213
;;; lsp-verilog.el ends here

docs/lsp-clients.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,15 @@
10561056
"installation": "meson build && ninja -C build install",
10571057
"debugger": "Not available"
10581058
},
1059+
{
1060+
"name": "verible",
1061+
"common-group-name": "verilog",
1062+
"full-name": "Verilog/SystemVerilog",
1063+
"server-name": "verible-verilog-ls",
1064+
"server-url": "https://github.com/chipsalliance/verible",
1065+
"installation": "https://github.com/chipsalliance/verible#installation",
1066+
"debugger": "Not available"
1067+
},
10591068
{
10601069
"name": "verilog",
10611070
"common-group-name": "verilog",

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ nav:
160160
- Vala: page/lsp-vala.md
161161
- Verilog/SystemVerilog (hdl-checker): page/lsp-verilog.md
162162
- Verilog/SystemVerilog (svlangserver): page/lsp-svlangserver.md
163+
- Verilog/SystemVerilog (verible): page/lsp-verible.md
163164
- VHDL: page/lsp-vhdl.md
164165
- Vimscript: page/lsp-vimscript.md
165166
- Vue 2: page/lsp-vetur.md

0 commit comments

Comments
 (0)