aboutsummaryrefslogtreecommitdiff
path: root/helix-lsp/src
diff options
context:
space:
mode:
authorMatouš Dzivjak2022-12-09 03:57:03 +0000
committerGitHub2022-12-09 03:57:03 +0000
commit8abed3bd78200fc5f7e3890fd853c17ce518d157 (patch)
tree8edd1bf79e309fe32bb3cd6dad9848a4113ffdc8 /helix-lsp/src
parent6798a6651f9d314eacefddfd051661b030ca9d78 (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/src')
-rw-r--r--helix-lsp/src/client.rs6
1 files changed, 5 insertions, 1 deletions
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
};