Skip to content

Commit

Permalink
Change the order of exit and shutdown to match specification
Browse files Browse the repository at this point in the history
  • Loading branch information
vv9k committed Jun 18, 2021
1 parent 8c7e822 commit 4d2339b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion helix-core/src/indent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ where
scope: "source.rust".to_string(),
file_types: vec!["rs".to_string()],
language_id: Lang::Rust,
highlight_config: OnceCell::new(),
highlight_configs: OnceCell::new(),
//
roots: vec![],
auto_format: false,
Expand Down
10 changes: 5 additions & 5 deletions helix-lsp/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,15 +261,15 @@ impl Client {

/// Tries to shut down the language server but returns
/// early if server responds with an error.
pub async fn exit_and_shutdown(&self) -> Result<()> {
self.exit().await?;
self.shutdown().await
pub async fn shutdown_and_exit(&self) -> Result<()> {
self.shutdown().await?;
self.exit().await
}

/// Forcefully shuts down the language server ignoring any errors.
pub async fn force_shutdown(&self) -> Result<()> {
let _ = self.exit().await;
self.shutdown().await
let _ = self.shutdown().await;
self.exit().await
}

// -------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 4d2339b

Please sign in to comment.