diff --git a/rascal-lsp/src/main/rascal/lang/rascal/lsp/refactor/WorkspaceInfo.rsc b/rascal-lsp/src/main/rascal/lang/rascal/lsp/refactor/WorkspaceInfo.rsc index 273478a4..6b2cb4bf 100644 --- a/rascal-lsp/src/main/rascal/lang/rascal/lsp/refactor/WorkspaceInfo.rsc +++ b/rascal-lsp/src/main/rascal/lang/rascal/lsp/refactor/WorkspaceInfo.rsc @@ -736,7 +736,11 @@ DefsUsesRenames rascalGetDefsUses(WorkspaceInfo ws, cursor(moduleName(), cursorL set[loc] defs = {ms | ms <- getModuleScopes(ws), ms.top == moduleFile}; - imports = {u | u <- ws.useDef<0>, amodule(cursorName) := ws.facts[u]}; + rel[loc fromFile, loc toFile] modulePaths = toRel(getModuleScopePerFile(ws)) o rascalGetTransitiveReflexiveModulePaths(ws); + set[loc] importUses = {u + | > <- ws.useDef o definitionsRel(ws) + , in modulePaths + }; rel[loc file, loc use] qualifiedUseCandidates = {