@@ -6,6 +6,7 @@ defines how the server should process various LSP requests and notifications.
66[1]: https://microsoft.github.io/language-server-protocol/
77 */
88
9+ use std:: env;
910use std:: ops:: ControlFlow ;
1011use std:: sync:: Arc ;
1112
@@ -35,10 +36,10 @@ use async_lsp::lsp_types::{
3536 SelectionRange , SelectionRangeParams , SelectionRangeProviderCapability ,
3637 SemanticTokensFullOptions , SemanticTokensLegend , SemanticTokensOptions ,
3738 SemanticTokensRangeResult , SemanticTokensResult ,
38- SemanticTokensServerCapabilities , ServerCapabilities , ShowMessageParams ,
39- TextDocumentSyncCapability , TextDocumentSyncKind , TextDocumentSyncOptions ,
40- TextDocumentSyncSaveOptions , TextEdit , Unregistration ,
41- UnregistrationParams , Url , WatchKind , WorkspaceEdit ,
39+ SemanticTokensServerCapabilities , ServerCapabilities , ServerInfo ,
40+ ShowMessageParams , TextDocumentSyncCapability , TextDocumentSyncKind ,
41+ TextDocumentSyncOptions , TextDocumentSyncSaveOptions , TextEdit ,
42+ Unregistration , UnregistrationParams , Url , WatchKind , WorkspaceEdit ,
4243 WorkspaceFoldersServerCapabilities , WorkspaceServerCapabilities ,
4344} ;
4445use async_lsp:: router:: Router ;
@@ -210,7 +211,10 @@ impl LanguageServer for YARALanguageServer {
210211 } ) ,
211212 ..ServerCapabilities :: default ( )
212213 } ,
213- server_info : None ,
214+ server_info : Some ( ServerInfo {
215+ name : "yara-x-ls" . to_string ( ) ,
216+ version : Some ( env ! ( "CARGO_PKG_VERSION" ) . to_string ( ) ) ,
217+ } ) ,
214218 } )
215219 } )
216220 }
0 commit comments