Skip to content

Commit 1b17160

Browse files
committed
Sync after init
1 parent ea2403d commit 1b17160

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/server.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ impl LanguageServer for Backend {
101101
}
102102

103103
async fn initialized(&self, _: InitializedParams) {
104+
if self.should_sync() {
105+
self.do_sync().await;
106+
}
104107
self.client
105108
.log_message(MessageType::INFO, "initialized!")
106109
.await;
@@ -408,7 +411,6 @@ impl Backend {
408411

409412
async fn init(&self, params: Option<Value>, cwd: String) {
410413
self.parse_params(params);
411-
412414
if self.should_install() {
413415
match self.cli.install_or_update() {
414416
Ok(status) => {
@@ -424,10 +426,6 @@ impl Backend {
424426
}
425427
}
426428
}
427-
428-
if self.should_sync() {
429-
self.do_sync().await;
430-
}
431429
}
432430

433431
fn should_install(&self) -> bool {

0 commit comments

Comments
 (0)