Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neovim on Mac OS cannot find vhdl_library exception and VHDL LS doesn't function #295

Open
FredKellerman opened this issue Apr 20, 2024 · 2 comments

Comments

@FredKellerman
Copy link

Hi, I am using Neovim 0.9.5 Release on a Macbook running Sonoma 14.4.1 and Brew.

I used Mason to install rust_hdl and have the following in a lua script that is being executed without any errors itself:

lspconfig = require('lspconfig')
lspconfig['vhdl_ls'].setup({
  on_attach = on_attach,
  capabilities = capabilities
})

Everything seems to be setup correctly, :checkhealth doesn't report anything obvious but VHDL LS doesn't work when editing and :messages reports:

Client 1 quit with exit code 101 and signal 0

In the .local/state/nvim/lsp.log it has:

[ERROR][2024-04-20 17:08:25] .../vim/lsp/rpc.lua:734	"rpc"	".local/share/nvim/mason/bin/vhdl_ls"	"stderr"	"thread 'main' panicked at vhdl_lang/src/config.rs:280:9:\nCouldn't find installed libraries at ../vhdl_libraries, ../../vhdl_libraries, /usr/lib/rust_hdl/vhdl_libraries, ../share/vhdl_libraries.\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n"

I have verified that the libraries are installed here:

 .local/share/nvim/mason/packages/rust_hdl/vhdl_ls-aarch64-apple-darwin/vhdl_libraries

I did try to copy and create sym links to where the error said it was looking but it didn't make any difference. I can provide more details if needed. Thank you.

@srbarton43
Copy link

Getting same error on MacOS 14.1.1

@Schottkyc137 Schottkyc137 added the bug Something isn't working label May 9, 2024
@Schottkyc137
Copy link
Contributor

The issue seems to be that Mason installs the binary to ~/.local/share/nvim/mason/bin, but the libraries are installed at ~/.local/share/nvim/mason/packages/rust_hdl/vhdl_ls-aarch64-apple-darwin/vhdl_libraries. I think that this is a problem with the Mason installation process. Looking over the package description, maybe the share property needs to be set to {{source.asset.vhdl_libraries}} or similar?
I can verify that symlinking the libraries to ~/.local/share/nvim/mason/share works and causes the language server to start.
Please note that VHDL-LS does not maintain the rust_hdl Mason package. Therefore, as this seems to be a bug / missing installation instructions on Mason, I will not consider this a bug here.

@Schottkyc137 Schottkyc137 removed the bug Something isn't working label May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants