I'm currently implementing onReferences on the server side of a language server. When a user right clicks on some custom syntax in a markdown file, I want to be able to use that syntax to search for other occurances of strings elsewhere in the workspace.

connection.onReferences((params) => {
    // I can get the syntax here from the client through params and the document manager
    // but I only have access to the document manager and the open documents.

    // I want to be able to return a location from a possibly unopened file elsewhere

    return null;
});

Since I know this happens all the time with the ts-server (click on an interface name and find all occurances) I know this is surely possible. What general strategy am I missing that I can obtain locations of strings elsewhere?

0

There are 0 answers