aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_lsp_server')
-rw-r--r--crates/ra_lsp_server/Cargo.toml1
-rw-r--r--crates/ra_lsp_server/src/world.rs7
2 files changed, 7 insertions, 1 deletions
diff --git a/crates/ra_lsp_server/Cargo.toml b/crates/ra_lsp_server/Cargo.toml
index 46a0f958c..677d81835 100644
--- a/crates/ra_lsp_server/Cargo.toml
+++ b/crates/ra_lsp_server/Cargo.toml
@@ -18,6 +18,7 @@ parking_lot = "0.9.0"
18jod-thread = "0.1.0" 18jod-thread = "0.1.0"
19ra_vfs = "0.4.0" 19ra_vfs = "0.4.0"
20ra_syntax = { path = "../ra_syntax" } 20ra_syntax = { path = "../ra_syntax" }
21ra_db = { path = "../ra_db" }
21ra_text_edit = { path = "../ra_text_edit" } 22ra_text_edit = { path = "../ra_text_edit" }
22ra_ide_api = { path = "../ra_ide_api" } 23ra_ide_api = { path = "../ra_ide_api" }
23lsp-server = "0.2.0" 24lsp-server = "0.2.0"
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