From d27d752dd466de33ab11fcbef88eb30e9248d3df Mon Sep 17 00:00:00 2001 From: Filipe Azevedo Date: Sat, 20 Aug 2022 23:48:43 +0100 Subject: [PATCH] Update helix-term/src/commands/typed.rs Co-authored-by: Michael Davis --- helix-term/src/commands/typed.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs index 1b32b2aeb0785..80b59fd499073 100644 --- a/helix-term/src/commands/typed.rs +++ b/helix-term/src/commands/typed.rs @@ -994,7 +994,7 @@ fn lsp_restart( let (_view, doc) = current!(cx.editor); let config = doc .language_config() - .ok_or_else(|| anyhow!("LSP not defined for current document"))?; + .context("LSP not defined for the current document")?; let scope = config.scope.clone(); cx.editor.language_servers.restart(config)?;