aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src/world.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-09-09 15:35:21 +0100
committerGitHub <[email protected]>2019-09-09 15:35:21 +0100
commit7258523a519207a033dedde8c498debe8da4a15e (patch)
tree4d2c08f9b357040ba135fa66aa5a981058f6f55c /crates/ra_lsp_server/src/world.rs
parent76f39b4b20d32b67fb60220e9d2a6ceb3f44fbb7 (diff)
parente5a8093dd497518c177d3c22404d80da44905336 (diff)
Merge #1789
1789: Debug r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_lsp_server/src/world.rs')
-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