Skip to content

Commit 294fade

Browse files
committed
Adding how to use LanguageClient-neovim
1 parent 4188780 commit 294fade

File tree

1 file changed

+26
-12
lines changed

1 file changed

+26
-12
lines changed

README.md

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ compilation order, interpreting some compilers messages and providing some
1919

2020
* [Installation](#installation)
2121
* [Editor support](#editor-support)
22-
* [Vim/NeoVim](#vimneovim)
2322
* [VS Code](#vs-code)
23+
* [Vim/NeoVim](#vimneovim)
2424
* [Usage](#usage)
2525
* [Third-party tools](#third-party-tools)
2626
* [Configuring HDL Checker](#configuring-HDL-Checker)
@@ -48,19 +48,22 @@ pip install hdl-checker --user --upgrade
4848

4949
## Editor support
5050

51+
### VS Code
52+
53+
Install the [HDL Checker VSCode client][hdl_checker_vscode] on VS Code.
54+
5155
### Vim/NeoVim
5256

5357
#### Using [dense-analysis/ale][ALE]
5458

55-
See (PR [#2804][ALE_PR]), once it gets merged, ALE should support HDL Checker out of the
56-
box.
59+
See (PR [#2804][ALE_PR]), once it gets merged, ALE should support HDL Checker out
60+
of the box.
5761

58-
#### Usgin [coc.nvim][coc_nvim]
62+
#### Using [coc.nvim][coc_nvim]
5963

6064
Following [coc.nvim custom language server setup][coc_nvim_register_lsp], add
6165
this to your [coc.nvim configuration file][coc_nvim_config_file]:
6266

63-
6467
```json
6568
{
6669
"languageserver": {
@@ -79,9 +82,19 @@ this to your [coc.nvim configuration file][coc_nvim_config_file]:
7982
}
8083
```
8184

82-
### VS Code
85+
#### Using [autozimu/LanguageClient-neovim][lc_nvim]
8386

84-
Install the [HDL Checker VSCode client][hdl_checker_vscode] on VS Code.
87+
Add HDL Checker to the server commands:
88+
89+
```viml
90+
let g:LanguageClient_serverCommands = {
91+
\ 'vhdl': ['hdl_checker', '--lsp'],
92+
\ 'verilog': ['hdl_checker', '--lsp'],
93+
\ 'systemverilog': ['hdl_checker', '--lsp'],
94+
\}
95+
```
96+
97+
Please note that this will start one server per language
8598

8699
## Usage
87100

@@ -138,8 +151,8 @@ in LSP mode:
138151
hdl_checker --lsp
139152
```
140153
141-
On a Linux system, log file will be at `/tmp/hdl_checker_log_pid<PID_NUMBER>.log` and
142-
`/tmp/hdl_checker_stderr_pid<PID_NUMBER>.log`.
154+
On a Linux system, log file will be at `/tmp/hdl_checker_log_pid<PID_NUMBER>.log`
155+
and `/tmp/hdl_checker_stderr_pid<PID_NUMBER>.log`.
143156
144157
As a language server, HDL Checker will provide
145158
@@ -157,9 +170,9 @@ HDL Checker can be used in HTTP server mode also:
157170
hdl_checker
158171
```
159172
160-
*Please note that this mode **does not use LSP to communicate**. Request/response
161-
API is not yet available, but a reference implementation can be found in
162-
[vim-hdl][vim-hdl]*
173+
*Please note that this mode **does not use LSP over http to communicate**.
174+
Request/response API is not yet available and is going to be deprecated in the
175+
future. A reference implementation can be found in [vim-hdl][vim-hdl]*
163176
164177
## Testing
165178
@@ -240,6 +253,7 @@ trademarks mentioned or used by this software.
240253
[hdl_checker_wiki_setup]: https://github.com/suoto/hdl_checker/wiki/Setting-up-a-project
241254
[Intel_msim]: https://www.intel.com/content/www/us/en/software/programmable/quartus-prime/model-sim.html
242255
[issue_tracker]: https://github.com/suoto/hdl_checker/issues
256+
[lc_nvim]: https://github.com/autozimu/LanguageClient-neovim
243257
[LSP]: https://en.wikipedia.org/wiki/Language_Server_Protocol
244258
[Mentor_msim]: http://www.mentor.com/products/fv/modelsim/
245259
[vim-hdl]: https://github.com/suoto/vim-hdl/

0 commit comments

Comments
 (0)