Skip to content

Commit 5ca32e3

Browse files
Chris44442christoph bothe
andauthored
Added "Use in Neovim" to readme (#269)
* added "Use in Neovim" to readme * added requested changes from PR discussion --------- Co-authored-by: christoph bothe <christoph_bothe@gmx.de>
1 parent 7dbc8e0 commit 5ca32e3

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,28 @@ following snippet to your config:
5252
(vhdl-ext-lsp-set-server 've-rust-hdl) ; `lsp' config
5353
```
5454

55+
## Manual Installation for Neovim
56+
57+
Neovim provides an LSP client to the VHDL_LS language server. Download the
58+
VHDL_LS release. The binary must be on the path and executable (if you can run
59+
"vhdl_ls -h" in the terminal then you're good).
60+
61+
In your Neovim config.lua add the following:
62+
63+
```lua
64+
function STARTVHDLLS()
65+
vim.lsp.start({
66+
name = 'vhdl_ls',
67+
cmd = {'vhdl_ls'},
68+
})
69+
end
70+
vim.api.nvim_set_keymap('n', '<F5>', ':lua STARTVHDLLS()<CR>', { noremap = true, silent = true })
71+
```
72+
73+
Using the example above, pressing F5 while inside Neovim starts the language
74+
server. There are also other options, like automatically starting it when
75+
opening a certain file type, see the [Neovim LSP documentation](https://neovim.io/doc/user/lsp.html) for more.
76+
5577
### Configuration
5678
The language server needs to know your library mapping to perform full analysis of the code. For this it uses a configuration file in the [TOML](https://github.com/toml-lang/toml) format named `vhdl_ls.toml`.
5779

0 commit comments

Comments
 (0)