rust_hdl icon indicating copy to clipboard operation
rust_hdl copied to clipboard

Better document vhdl_ls.toml

Open werdahias opened this issue 1 month ago • 4 comments

It would be great if vhdl_ls had better documentation, especially regarding the setup with vhdl_ls.toml.

Right now with neovim 0.11 I have the following:

cat vhdl_ls.toml                                                                                          
standard = "2008"
[libraries]
lib1.files = [ "./test.vhdl"]

test.vhdl is in the same folder as vhdl_ls.toml.

In neovim 0.11 I configured it like this:

return {
	cmd = { "vhdl_ls", "-l" ,"/usr/lib/ghdl/src" },
    root_markers = vim.fs.dirname(
	vim.fs.find({'*.vhl', '*.vhdl'}, {upward = true})[1]
	),
    filetypes = { 'vhdl' },
}

However, startup fails:

[WARN][2025-10-27 10:17:36] ...lsp/handlers.lua:564	"Opening file /home/werdahias/test.vhdl that is not part of the project"
[START][2025-10-27 10:18:00] LSP logging initiated
[ERROR][2025-10-27 10:18:00] ...lsp/handlers.lua:562	"Cannot load workspace: Initialize request is missing rootUri parameter."
[ERROR][2025-10-27 10:18:00] ...lsp/handlers.lua:562	"Error while loading Installation configuration file: No such file or directory (os error 2) "
[ERROR][2025-10-27 10:18:00] ...lsp/handlers.lua:562	"Error loading vhdl_ls.toml: Workspace root configuration file not set"

I couldn't find any documentation for the rootURI parameter; I think an example vhdl_ls.toml or a manpage would help a lot.

werdahias avatar Oct 27 '25 09:10 werdahias

There are details of the configuration required in the README - https://github.com/VHDL-LS/rust_hdl?tab=readme-ov-file#configuration

Xcodo avatar Oct 27 '25 09:10 Xcodo

@Xcodo That doesn't explain where I need to set rootUri though

werdahias avatar Oct 27 '25 10:10 werdahias

I don't think that rootURI is part of vhdl_ls. It looks like this error is coming from neovim.

There's an example of a working output trace in #142. There's also an example of setting up neovim in the README. I think that is all the support with neovim that is offered here.

Xcodo avatar Oct 27 '25 10:10 Xcodo

There is now a new comprehensive wiki entry on the vhdl_ls.toml configuration format. Although I think that this issue is rather a documentation request for the usage / configuration of the language server, correct?

Schottkyc137 avatar Nov 29 '25 17:11 Schottkyc137