diff options
| author | fmaggi <61335294+fmaggi@users.noreply.github.com> | 2023-03-15 08:29:39 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-15 19:29:39 +0800 |
| commit | 491feed8249ed9e6beeb08f3ae9b9a993ea3ca0d (patch) | |
| tree | b4c9241aa90c4bcb6be303a5b0fde020175ce293 /lua | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-491feed8249ed9e6beeb08f3ae9b9a993ea3ca0d.tar nvim-lspconfig-491feed8249ed9e6beeb08f3ae9b9a993ea3ca0d.tar.gz nvim-lspconfig-491feed8249ed9e6beeb08f3ae9b9a993ea3ca0d.tar.bz2 nvim-lspconfig-491feed8249ed9e6beeb08f3ae9b9a993ea3ca0d.tar.lz nvim-lspconfig-491feed8249ed9e6beeb08f3ae9b9a993ea3ca0d.tar.xz nvim-lspconfig-491feed8249ed9e6beeb08f3ae9b9a993ea3ca0d.tar.zst nvim-lspconfig-491feed8249ed9e6beeb08f3ae9b9a993ea3ca0d.zip | |
feat: add vhdl support (#2504)
* feat: add vhdl support
* fix(vhdl_ls): added windows support
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/vhdl_ls.lua | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/lua/lspconfig/server_configurations/vhdl_ls.lua b/lua/lspconfig/server_configurations/vhdl_ls.lua new file mode 100644 index 00000000..7d04ec5f --- /dev/null +++ b/lua/lspconfig/server_configurations/vhdl_ls.lua @@ -0,0 +1,50 @@ +local util = require 'lspconfig.util' + +local root_files = { + 'vhdl_ls.toml', + '.vhdl_ls.toml', +} + +local cmd = { 'vhdl_ls' } +if vim.fn.has 'win32' == 1 then + cmd = { 'cmd.exe', '/C', 'vhdl_ls' } +end + +return { + default_config = { + cmd = cmd, + filetypes = { 'vhd' }, + root_dir = util.root_pattern(unpack(root_files)), + single_file_support = true, + }, + docs = { + description = [[ +Install vhdl_ls from https://github.com/VHDL-LS/rust_hdl and add it to path + +Configuration + +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 format named vhdl_ls.toml. + +vhdl_ls will load configuration files in the following order of priority (first to last): + + A file named .vhdl_ls.toml in the user home folder. + A file name from the VHDL_LS_CONFIG environment variable. + A file named vhdl_ls.toml in the workspace root. + +Settings in a later files overwrites those from previously loaded files. + +Example vhdl_ls.toml +``` +# File names are either absolute or relative to the parent folder of the vhdl_ls.toml file +[libraries] +lib2.files = [ + 'pkg2.vhd', +] +lib1.files = [ + 'pkg1.vhd', + 'tb_ent.vhd' +] +``` +]], + }, +} |
