-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(lsp): pass client_info on initialization #4904
Conversation
helix-lsp/build.rs
Outdated
let git_hash = Command::new("git") | ||
.args(["rev-parse", "HEAD"]) | ||
.output() | ||
.ok() | ||
.filter(|output| output.status.success()) | ||
.and_then(|x| String::from_utf8(x.stdout).ok()); | ||
|
||
let version: Cow<_> = match git_hash { | ||
Some(git_hash) => format!("{} ({})", VERSION, &git_hash[..8]).into(), | ||
None => VERSION.into(), | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a small block to re-use but I wonder if it should be a constant in helix-loader
so it can be re-used in helix-lsp
and helix-term
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, also not sure if it maybe would be better to expose GIT_SHA
on it's own.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@the-mikedavis I tried it but it makes it very verbose in around the 3 call-sides we have. Until we have a use case for GIT_HASH
on it's own I would keep it this way.
Pass client name ('helix') and client version (version / git hash) to LSP server on initialization.
e783c49
to
57aced2
Compare
Pass client name ('helix') and client version (version / git hash) to LSP server on initialization.
Pass client name ('helix') and client version (version / git hash) to LSP server on initialization.
Pass client name ('helix') and client version (version / git hash) to LSP server on initialization.