diff options
author | Matouš Dzivjak | 2022-12-09 03:57:03 +0000 |
---|---|---|
committer | GitHub | 2022-12-09 03:57:03 +0000 |
commit | 8abed3bd78200fc5f7e3890fd853c17ce518d157 (patch) | |
tree | 8edd1bf79e309fe32bb3cd6dad9848a4113ffdc8 /helix-lsp | |
parent | 6798a6651f9d314eacefddfd051661b030ca9d78 (diff) |
feat(lsp): pass client_info on initialization (#4904)
Pass client name ('helix') and client version (version / git hash)
to LSP server on initialization.
Diffstat (limited to 'helix-lsp')
-rw-r--r-- | helix-lsp/Cargo.toml | 1 | ||||
-rw-r--r-- | helix-lsp/src/client.rs | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/helix-lsp/Cargo.toml b/helix-lsp/Cargo.toml index 41884e73..05c5467e 100644 --- a/helix-lsp/Cargo.toml +++ b/helix-lsp/Cargo.toml @@ -13,6 +13,7 @@ homepage = "https://helix-editor.com" [dependencies] helix-core = { version = "0.6", path = "../helix-core" } +helix-loader = { version = "0.6", path = "../helix-loader" } anyhow = "1.0" futures-executor = "0.3" 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 }; |