From 9fe3adcff9866ef18953a067fbc0b84e7eb968b5 Mon Sep 17 00:00:00 2001 From: Pascal Kuthe Date: Fri, 31 Mar 2023 04:26:20 +0200 Subject: add option to enable/disable lsp snippets --- helix-lsp/src/client.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'helix-lsp/src/client.rs') diff --git a/helix-lsp/src/client.rs b/helix-lsp/src/client.rs index f9496338..94e99489 100644 --- a/helix-lsp/src/client.rs +++ b/helix-lsp/src/client.rs @@ -411,7 +411,7 @@ impl Client { // General messages // ------------------------------------------------------------------------------------------- - pub(crate) async fn initialize(&self) -> Result { + pub(crate) async fn initialize(&self, enable_snippets: bool) -> Result { if let Some(config) = &self.config { log::info!("Using custom LSP config: {}", config); } @@ -459,7 +459,7 @@ impl Client { text_document: Some(lsp::TextDocumentClientCapabilities { completion: Some(lsp::CompletionClientCapabilities { completion_item: Some(lsp::CompletionItemCapability { - snippet_support: Some(true), + snippet_support: Some(enable_snippets), resolve_support: Some(lsp::CompletionItemCapabilityResolveSupport { properties: vec![ String::from("documentation"), -- cgit v1.2.3-70-g09d2