in runtimes/runtimes/standalone.ts [178:194]
getAllTextDocuments: async () => documents.all(),
// Get all workspace folders and return the workspace folder that contains the uri
getWorkspaceFolder: uri => {
const fileUrl = new URL(uri)
const normalizedFileUri = fileUrl.pathname || ''
const folders = lspRouter.clientInitializeParams!.workspaceFolders
if (!folders) return undefined
for (const folder of folders) {
const folderUrl = new URL(folder.uri)
const normalizedFolderUri = folderUrl.pathname || ''
if (normalizedFileUri.startsWith(normalizedFolderUri)) {
return folder
}
}
},