From 58dd76efaf4202abb214682a13a06249e0e5a619 Mon Sep 17 00:00:00 2001 From: "gcp-cherry-pick-bot[bot]" <98988430+gcp-cherry-pick-bot[bot]@users.noreply.github.com> Date: Mon, 22 Apr 2024 14:55:30 -0400 Subject: [PATCH] Fix reading workspace-level LSP settings in extensions (cherry-pick #10859) (#10860) Cherry-picked Fix reading workspace-level LSP settings in extensions (#10859) This PR fixes an issue where workspace-level LSP settings could be not read using `LspSettings::for_worktree` in extensions. We we erroneously always reading the global settings instead of respecting the passed-in location. Release Notes: - Fixed a bug where workspace LSP settings could not be read by extensions. Co-authored-by: Marshall Bowers --- crates/extension/src/wasm_host/wit/since_v0_0_6.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/extension/src/wasm_host/wit/since_v0_0_6.rs b/crates/extension/src/wasm_host/wit/since_v0_0_6.rs index 2c201169a0e98c6b96b25bc02297db16a894576b..7d3c7b638023cdbf22cace5d38010941cb9af86a 100644 --- a/crates/extension/src/wasm_host/wit/since_v0_0_6.rs +++ b/crates/extension/src/wasm_host/wit/since_v0_0_6.rs @@ -227,7 +227,7 @@ impl ExtensionImports for WasmState { "lsp" => { let settings = key .and_then(|key| { - ProjectSettings::get_global(cx) + ProjectSettings::get(location, cx) .lsp .get(&Arc::::from(key)) })