aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_lsp_server/src')
-rw-r--r--crates/ra_lsp_server/src/world.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/ra_lsp_server/src/world.rs b/crates/ra_lsp_server/src/world.rs
index 086ecd587..232409c3b 100644
--- a/crates/ra_lsp_server/src/world.rs
+++ b/crates/ra_lsp_server/src/world.rs
@@ -92,6 +92,7 @@ impl WorldState {
92 let vfs_root_path = vfs.root2path(r); 92 let vfs_root_path = vfs.root2path(r);
93 let is_local = folder_roots.iter().any(|it| vfs_root_path.starts_with(it)); 93 let is_local = folder_roots.iter().any(|it| vfs_root_path.starts_with(it));
94 change.add_root(SourceRootId(r.0), is_local); 94 change.add_root(SourceRootId(r.0), is_local);
95 change.set_debug_root_path(SourceRootId(r.0), vfs_root_path.display().to_string());
95 } 96 }
96 97
97 // Create crate graph from all the workspaces 98 // Create crate graph from all the workspaces
@@ -101,7 +102,11 @@ impl WorldState {
101 vfs_file.map(|f| FileId(f.0)) 102 vfs_file.map(|f| FileId(f.0))
102 }; 103 };
103 for ws in workspaces.iter() { 104 for ws in workspaces.iter() {
104 crate_graph.extend(ws.to_crate_graph(&mut load)); 105 let (graph, crate_names) = ws.to_crate_graph(&mut load);
106 let shift = crate_graph.extend(graph);
107 for (crate_id, name) in crate_names {
108 change.set_debug_crate_name(crate_id.shift(shift), name)
109 }
105 } 110 }
106 change.set_crate_graph(crate_graph); 111 change.set_crate_graph(crate_graph);
107 112