Skip to content

Commit

Permalink
fix: Don't require building from a git repo
Browse files Browse the repository at this point in the history
Fixes #37
  • Loading branch information
Marwes committed Aug 17, 2020
1 parent c339226 commit 9f5e9e3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/command/initialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ impl LanguageServerCommand<InitializeParams> for Initialize {
Ok(InitializeResult {
server_info: Some(ServerInfo {
name: "Gluon language server".into(),
version: Some(
concat!(env!("CARGO_PKG_VERSION"), "-", env!("GIT_COMMIT")).into(),
),
version: Some(match option_env!("GIT_COMMIT") {
Some(git_commit) => format!("{}-{}", env!("CARGO_PKG_VERSION"), git_commit),
None => env!("CARGO_PKG_VERSION").into(),
}),
}),
capabilities: ServerCapabilities {
text_document_sync: Some(TextDocumentSyncCapability::Kind(
Expand Down

0 comments on commit 9f5e9e3

Please sign in to comment.