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
|
@ -6,7 +6,7 @@ use gpui::AsyncAppContext;
|
|||
use language::{LanguageToolchainStore, LspAdapter, LspAdapterDelegate};
|
||||
use lsp::{LanguageServerBinary, LanguageServerName};
|
||||
use node_runtime::NodeRuntime;
|
||||
use project::lsp_store::language_server_settings;
|
||||
use project::{lsp_store::language_server_settings, Fs};
|
||||
use serde_json::{json, Value};
|
||||
use smol::fs;
|
||||
use std::{
|
||||
|
@ -116,6 +116,7 @@ impl LspAdapter for TailwindLspAdapter {
|
|||
|
||||
async fn initialization_options(
|
||||
self: Arc<Self>,
|
||||
_: &dyn Fs,
|
||||
_: &Arc<dyn LspAdapterDelegate>,
|
||||
) -> Result<Option<serde_json::Value>> {
|
||||
Ok(Some(json!({
|
||||
|
@ -131,6 +132,7 @@ impl LspAdapter for TailwindLspAdapter {
|
|||
|
||||
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