Currently lsp-mode opens one project when the first file in a workspace is opened. It uses the default library set in workspace.json or otherwise the default test library. Taking my sockets library as an example, it usually defaults to opening "sockets-test-suite".
When I open one of the files in, say, examples/echo/threaded-echo-client/, which isn't used by "sockets-test-suite", lsp-mode has no idea how to find definitions. e.g. "No definitions found for: " when I M-. on <string>. This even though lsp-mode recognizes that the file is part of the workspace.
The compiler environment code can have multiple projects open at the same time so probably we need to figure out what library the file is part of and make sure that library is open and built.
(I'd hate to have to do this, but if for some reason the above doesn't work, auto-generate (with Deft?) a library that uses all other workspace libraries and open that? This would still fail if a new library was added to the workspace.)
Currently
lsp-modeopens one project when the first file in a workspace is opened. It uses the default library set in workspace.json or otherwise the default test library. Taking my sockets library as an example, it usually defaults to opening "sockets-test-suite".When I open one of the files in, say, examples/echo/threaded-echo-client/, which isn't used by "sockets-test-suite",
lsp-modehas no idea how to find definitions. e.g. "No definitions found for: " when IM-.on<string>. This even thoughlsp-moderecognizes that the file is part of the workspace.The compiler environment code can have multiple projects open at the same time so probably we need to figure out what library the file is part of and make sure that library is open and built.
(I'd hate to have to do this, but if for some reason the above doesn't work, auto-generate (with Deft?) a library that uses all other workspace libraries and open that? This would still fail if a new library was added to the workspace.)