From 8abed3bd78200fc5f7e3890fd853c17ce518d157 Mon Sep 17 00:00:00 2001 From: Matouš Dzivjak Date: Fri, 9 Dec 2022 04:57:03 +0100 Subject: feat(lsp): pass client_info on initialization (#4904) Pass client name ('helix') and client version (version / git hash) to LSP server on initialization.--- helix-lsp/src/client.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'helix-lsp/src') diff --git a/helix-lsp/src/client.rs b/helix-lsp/src/client.rs index 2c2c7c88..90fd2f21 100644 --- a/helix-lsp/src/client.rs +++ b/helix-lsp/src/client.rs @@ -5,6 +5,7 @@ use crate::{ }; use helix_core::{find_root, ChangeSet, Rope}; +use helix_loader::{self, VERSION_AND_GIT_HASH}; use lsp_types as lsp; use serde::Deserialize; use serde_json::Value; @@ -376,7 +377,10 @@ impl Client { ..Default::default() }, trace: None, - client_info: None, + client_info: Some(lsp::ClientInfo { + name: String::from("helix"), + version: Some(String::from(VERSION_AND_GIT_HASH)), + }), locale: None, // TODO }; -- cgit v1.2.3-70-g09d2