You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the server doesn't provide serverInfo in InitializeResult, the plugin will send an empty array instead of the initializationOptions set by the user when the server requests workspace/configuration.
Single quotes should not be changed. I have asked the plugin to tell the language server that I want single quotes, so the language server should not change it to double quotes.
Additional context
I am not sure if this is a correct patch, but at least it allows me to pass options to the YAML language server.
diff --git a/src/language_client.rs b/src/language_client.rs
index 0204c7c..e9bdcc9 100644
--- a/src/language_client.rs+++ b/src/language_client.rs@@ -973,11 +973,12 @@ impl LanguageClient {
let server_name = initialize_result
.server_info
.as_ref()
- .map(|info| info.name.clone());- if let (Some(name), Some(options)) = (server_name, initialization_options) {+ .map(|info| info.name.clone())+ .unwrap_or(command.name());+ if let Some(options) = initialization_options {
state.initialization_options = state
.initialization_options
- .combine(&json!({ name: options }));+ .combine(&json!({ server_name: options }));
}
let capabilities: ServerCapabilities = initialize_result.capabilities.clone();
The text was updated successfully, but these errors were encountered:
Describe the bug
If the server doesn't provide
serverInfo
inInitializeResult
, the plugin will send an empty array instead of theinitializationOptions
set by the user when the server requestsworkspace/configuration
.Environment
To Reproduce
call LanguageClient#textDocument_formatting()
Current behavior
Single quotes are changed to double quotes.
Expected behavior
Single quotes should not be changed. I have asked the plugin to tell the language server that I want single quotes, so the language server should not change it to double quotes.
Additional context
I am not sure if this is a correct patch, but at least it allows me to pass options to the YAML language server.
The text was updated successfully, but these errors were encountered: