Skip to content

Commit

Permalink
Sync after init
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkato committed May 18, 2023
1 parent ea2403d commit 1b17160
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ impl LanguageServer for Backend {
}

async fn initialized(&self, _: InitializedParams) {
if self.should_sync() {
self.do_sync().await;
}
self.client
.log_message(MessageType::INFO, "initialized!")
.await;
Expand Down Expand Up @@ -408,7 +411,6 @@ impl Backend {

async fn init(&self, params: Option<Value>, cwd: String) {
self.parse_params(params);

if self.should_install() {
match self.cli.install_or_update() {
Ok(status) => {
Expand All @@ -424,10 +426,6 @@ impl Backend {
}
}
}

if self.should_sync() {
self.do_sync().await;
}
}

fn should_install(&self) -> bool {
Expand Down

0 comments on commit 1b17160

Please sign in to comment.