mirror of
https://github.com/joshuadavidthomas/django-language-server.git
synced 2025-09-08 11:20:37 +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 {
|
||||
capabilities: ServerCapabilities {
|
||||
let capabilities = ServerCapabilities {
|
||||
text_document_sync: Some(TextDocumentSyncCapability::Options(
|
||||
TextDocumentSyncOptions {
|
||||
open_close: Some(true),
|
||||
|
@ -98,7 +97,17 @@ impl LanguageServer for DjangoLanguageServer {
|
|||
},
|
||||
})),
|
||||
..Default::default()
|
||||
},
|
||||
};
|
||||
|
||||
self.log_message(
|
||||
MessageType::INFO,
|
||||
&format!("Advertising capabilities: {:?}", capabilities),
|
||||
)
|
||||
.await
|
||||
.ok();
|
||||
|
||||
Ok(InitializeResult {
|
||||
capabilities,
|
||||
server_info: Some(ServerInfo {
|
||||
name: SERVER_NAME.to_string(),
|
||||
version: Some(SERVER_VERSION.to_string()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue