Omit tsdk_path
from the servers' options if it does not exist (#23525)
Part of https://github.com/zed-industries/zed/issues/22606 Before, `tsdk_path` for vtsls and typescript-language-server unconditionally set a `tsdk`/`tsserver` property for the corresponding language server, even if there were no such directory at all. Instead, make the corresponding code to omit such property if it was not found on the FS. Release Notes: - Fixed "The path /.../tsserver.js doesn't point to a valid tsserver install. Falling back to bundled TypeScript version." pop-up appearing
This commit is contained in:
parent
d1be419fff
commit
91b0ca0895
14 changed files with 92 additions and 19 deletions
|
@ -17,6 +17,7 @@ async-trait.workspace = true
|
|||
collections.workspace = true
|
||||
extension.workspace = true
|
||||
futures.workspace = true
|
||||
fs.workspace = true
|
||||
gpui.workspace = true
|
||||
language.workspace = true
|
||||
lsp.workspace = true
|
||||
|
|
|
@ -8,6 +8,7 @@ use anyhow::{Context, Result};
|
|||
use async_trait::async_trait;
|
||||
use collections::HashMap;
|
||||
use extension::{Extension, ExtensionLanguageServerProxy, WorktreeDelegate};
|
||||
use fs::Fs;
|
||||
use futures::{Future, FutureExt};
|
||||
use gpui::AsyncAppContext;
|
||||
use language::{
|
||||
|
@ -224,6 +225,7 @@ impl LspAdapter for ExtensionLspAdapter {
|
|||
|
||||
async fn initialization_options(
|
||||
self: Arc<Self>,
|
||||
_: &dyn Fs,
|
||||
delegate: &Arc<dyn LspAdapterDelegate>,
|
||||
) -> Result<Option<serde_json::Value>> {
|
||||
let delegate = Arc::new(WorktreeDelegateAdapter(delegate.clone())) as _;
|
||||
|
@ -246,6 +248,7 @@ impl LspAdapter for ExtensionLspAdapter {
|
|||
|
||||
async fn workspace_configuration(
|
||||
self: Arc<Self>,
|
||||
_: &dyn Fs,
|
||||
delegate: &Arc<dyn LspAdapterDelegate>,
|
||||
_: Arc<dyn LanguageToolchainStore>,
|
||||
_cx: &mut AsyncAppContext,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue