Remove the async modifier from the workspace_configuration method

This commit is contained in:
Kirill Bulatov 2024-01-23 11:58:17 +02:00
parent 351914f4bd
commit ab8585ee7e
6 changed files with 31 additions and 63 deletions

View file

@ -23,7 +23,7 @@ use async_trait::async_trait;
use collections::{HashMap, HashSet};
use futures::{
channel::{mpsc, oneshot},
future::{BoxFuture, Shared},
future::Shared,
FutureExt, TryFutureExt as _,
};
use gpui::{AppContext, AsyncAppContext, BackgroundExecutor, Task};
@ -216,11 +216,7 @@ impl CachedLspAdapter {
self.adapter.code_action_kinds()
}
pub fn workspace_configuration(
&self,
workspace_root: &Path,
cx: &mut AppContext,
) -> BoxFuture<'static, Value> {
pub fn workspace_configuration(&self, workspace_root: &Path, cx: &mut AppContext) -> Value {
self.adapter.workspace_configuration(workspace_root, cx)
}
@ -345,8 +341,8 @@ pub trait LspAdapter: 'static + Send + Sync {
None
}
fn workspace_configuration(&self, _: &Path, _: &mut AppContext) -> BoxFuture<'static, Value> {
futures::future::ready(serde_json::json!({})).boxed()
fn workspace_configuration(&self, _: &Path, _: &mut AppContext) -> Value {
serde_json::json!({})
}
/// Returns a list of code actions supported by a given LspAdapter