ghdl-language-server icon indicating copy to clipboard operation
ghdl-language-server copied to clipboard

vscode-client should look for 'hdl-prj.json' through the path of a file

Open eine opened this issue 6 years ago • 2 comments
trafficstars

The extension looks for 'hdl-prj.json' in the root of the workspace only. However, it is reasonable for users to have multiple projects in different subdirs of the workspace. I think that it would be useful if the extension looked for the JSON file bottom-up (from the location of the file to the workspace).

eine avatar Jun 17 '19 18:06 eine

I am not sure about that.

vs-code is really directory based, but some of the extensions work with a project file. I think C# needs a project file. I'd like to understand how they handle projects.

tgingold avatar Jun 18 '19 16:06 tgingold

There is the concept of multi-root workspaces: https://code.visualstudio.com/docs/editor/multi-root-workspaces For example, in VUnit, using multi-root workspaces would require defining each example as a folder in the workspace, and another one for VUnit itself. Otherwise, all the sources are considered to belong to the same project.

In GHDL, the following ghdl.code-workspace can be used, provided that the three repos are cloned in the same parent dir:

{
	"folders": [
		{
			"path": "ghdl"
		},
		{
			"path": "ghdl-docker"
		},
		{
			"path": "ghdl-ls"
		}
	]
}

eine avatar Jun 18 '19 18:06 eine