Skip to content

Commit 45d983e

Browse files
committed
lsp: Emit projects at startup
1 parent 3856da2 commit 45d983e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

dora-language-server/src/main.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,15 @@ fn main() -> Result<(), Box<dyn Error + Sync + Send>> {
5959
});
6060

6161
let projects = find_projects(&workspace_folders);
62-
for project in &projects {
63-
eprintln!("project {} -> {}", project.name, project.main.display());
62+
63+
if projects.is_empty() {
64+
eprintln!("no project found");
65+
} else {
66+
eprintln!("found {} projects.", projects.len());
67+
68+
for project in &projects {
69+
eprintln!("project {} -> {}", project.name, project.main.display());
70+
}
6471
}
6572

6673
connection.initialize_finish(id, initialize_data)?;

0 commit comments

Comments
 (0)