rust_hdl
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
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.
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"