From 588b2da40ae9db3bb28a8d5a0782e2e1828dfc79 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Mon, 3 Apr 2023 20:02:20 +0200 Subject: [PATCH 1/2] Disable key ordering diagnostic for YAML language server --- crates/zed/src/languages/yaml.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/zed/src/languages/yaml.rs b/crates/zed/src/languages/yaml.rs index a34bbeb596..a9a87fd585 100644 --- a/crates/zed/src/languages/yaml.rs +++ b/crates/zed/src/languages/yaml.rs @@ -106,6 +106,9 @@ impl LspAdapter for YamlLspAdapter { let settings = cx.global::(); Some( future::ready(serde_json::json!({ + "yaml": { + "keyOrdering": false + }, "[yaml]": { "editor.tabSize": settings.tab_size(Some("YAML")) } From 2c0a645f193fdc2eebf9e76d9d03113c72f5a865 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Mon, 3 Apr 2023 20:12:26 +0200 Subject: [PATCH 2/2] Provide `workspace_folders` capability when initializing LSP This fixes the YAML language server which was erroring on startup after adding the `did_change_watched_files` capability in #2258. --- crates/lsp/src/lsp.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/lsp/src/lsp.rs b/crates/lsp/src/lsp.rs index 514648cfa3..1e37c9765b 100644 --- a/crates/lsp/src/lsp.rs +++ b/crates/lsp/src/lsp.rs @@ -335,6 +335,7 @@ impl LanguageServer { did_change_configuration: Some(DynamicRegistrationClientCapabilities { dynamic_registration: Some(true), }), + workspace_folders: Some(true), ..Default::default() }), text_document: Some(TextDocumentClientCapabilities {