Skip to content

LSP should Just Work for ALL libraries in a workspace #46

@cgay

Description

@cgay

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions