rust_hdl icon indicating copy to clipboard operation
rust_hdl copied to clipboard

Newly opened files for editing get added to LS server even though the file is not in vhdl_ls.toml

Open thilomaurer opened this issue 1 year ago • 1 comments

In VSCode, when I open a VHDL file for editing, that is outside of the list of file defined in vhdl_ls.toml, I do get the warning message

"Opening file that is not part of the project"

and it seems the file is implicitly getting added to server so it can analyze it.

Problem: When the new file defines objects in conflict with other files's objects that actually do belong to the project, I do see a bunch of error messages like

"A primary unit has already been declared with name '' in library 'work'vhdl ls"

I would prefer a mode where files outside the project do not impact the project, i.e. where the list of project files is solely specified by vhdl_ls.toml.

IMHO, when this file exists, this mode should be the default.

thilomaurer avatar May 22 '23 21:05 thilomaurer

When this mode (calling it closed-project-scope now) was the new default, the user if need be may re-enable the "open-project-scope" via a configuration setting in vhdl_ls.toml, like so:

[libraries]
work.files = [...]
[config]
project.scope = "open"  #default would be "closed"

thilomaurer avatar May 22 '23 21:05 thilomaurer