mirror of
https://github.com/joshuadavidthomas/django-language-server.git
synced 2025-09-10 04:16:30 +00:00
feat: Add capability logging to LSP server initialization
This commit is contained in:
parent
fa5fe5c9ae
commit
0d59e8eaa7
1 changed files with 38 additions and 29 deletions
|
@ -69,8 +69,7 @@ impl LanguageServer for DjangoLanguageServer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(InitializeResult {
|
let capabilities = ServerCapabilities {
|
||||||
capabilities: ServerCapabilities {
|
|
||||||
text_document_sync: Some(TextDocumentSyncCapability::Options(
|
text_document_sync: Some(TextDocumentSyncCapability::Options(
|
||||||
TextDocumentSyncOptions {
|
TextDocumentSyncOptions {
|
||||||
open_close: Some(true),
|
open_close: Some(true),
|
||||||
|
@ -98,7 +97,17 @@ impl LanguageServer for DjangoLanguageServer {
|
||||||
},
|
},
|
||||||
})),
|
})),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
};
|
||||||
|
|
||||||
|
self.log_message(
|
||||||
|
MessageType::INFO,
|
||||||
|
&format!("Advertising capabilities: {:?}", capabilities),
|
||||||
|
)
|
||||||
|
.await
|
||||||
|
.ok();
|
||||||
|
|
||||||
|
Ok(InitializeResult {
|
||||||
|
capabilities,
|
||||||
server_info: Some(ServerInfo {
|
server_info: Some(ServerInfo {
|
||||||
name: SERVER_NAME.to_string(),
|
name: SERVER_NAME.to_string(),
|
||||||
version: Some(SERVER_VERSION.to_string()),
|
version: Some(SERVER_VERSION.to_string()),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue