Show configuration in language server debug logs (#23084)

Release Notes:

- Added configuration sent on initialization to the `Server Info`
section of the language server logs.
This commit is contained in:
Michael Sloan 2025-01-13 14:00:03 -07:00 committed by GitHub
parent d4e91c1898
commit 7c2c409f6d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 59 additions and 9 deletions

View file

@ -732,13 +732,17 @@ impl LspLogView {
* Running in project: {PATH:?}
* Capabilities: {CAPABILITIES}",
* Capabilities: {CAPABILITIES}
* Configuration: {CONFIGURATION}",
NAME = server.name(),
ID = server.server_id(),
BINARY = server.binary(),
PATH = server.root_path(),
CAPABILITIES = serde_json::to_string_pretty(&server.capabilities())
.unwrap_or_else(|e| format!("Failed to serialize capabilities: {e}")),
CONFIGURATION = serde_json::to_string_pretty(server.configuration())
.unwrap_or_else(|e| format!("Failed to serialize configuration: {e}")),
);
editor.set_text(server_info, cx);
editor.set_read_only(true);