Further unpropogate async

This commit is contained in:
Isaac Clayton 2022-07-06 14:24:42 +02:00
parent 4f016d5fc4
commit 6585daccf9
12 changed files with 86 additions and 106 deletions

View file

@ -11,7 +11,7 @@ use util::ResultExt;
pub struct CLspAdapter;
#[async_trait]
impl super::LspAdapter for CLspAdapter {
impl super::LspAdapterTrait for CLspAdapter {
async fn name(&self) -> LanguageServerName {
LanguageServerName("clangd".into())
}

View file

@ -18,7 +18,7 @@ lazy_static! {
}
#[async_trait]
impl super::LspAdapter for GoLspAdapter {
impl super::LspAdapterTrait for GoLspAdapter {
async fn name(&self) -> LanguageServerName {
LanguageServerName("gopls".into())
}

View file

@ -3,7 +3,7 @@ use anyhow::{anyhow, Context, Result};
use async_trait::async_trait;
use client::http::HttpClient;
use futures::StreamExt;
use language::{LanguageServerName, LspAdapter};
use language::{LanguageServerName, LspAdapter, LspAdapterTrait};
use serde_json::json;
use smol::fs;
use std::{any::Any, path::PathBuf, sync::Arc};
@ -17,7 +17,7 @@ impl JsonLspAdapter {
}
#[async_trait]
impl LspAdapter for JsonLspAdapter {
impl LspAdapterTrait for JsonLspAdapter {
async fn name(&self) -> LanguageServerName {
LanguageServerName("vscode-json-languageserver".into())
}

View file

@ -4,7 +4,7 @@ use client::http::HttpClient;
use futures::lock::Mutex;
use futures::Future;
use gpui::executor::Background;
use language::{LanguageServerName, LspAdapter};
use language::{LanguageServerName, LspAdapter, LspAdapterTrait};
use plugin_runtime::{Plugin, PluginBuilder, WasiFn};
use std::{any::Any, path::PathBuf, sync::Arc};
use util::ResultExt;
@ -72,7 +72,7 @@ struct Versions {
// - it's totally a deadlock, the proof is in the pudding
#[async_trait]
impl LspAdapter for PluginLspAdapter {
impl LspAdapterTrait for PluginLspAdapter {
async fn name(&self) -> LanguageServerName {
let name: String = self
.runtime

View file

@ -3,7 +3,7 @@ use anyhow::{anyhow, Context, Result};
use async_trait::async_trait;
use client::http::HttpClient;
use futures::StreamExt;
use language::{LanguageServerName, LspAdapter};
use language::{LanguageServerName, LspAdapter, LspAdapterTrait};
use smol::fs;
use std::{any::Any, path::PathBuf, sync::Arc};
use util::ResultExt;
@ -15,7 +15,7 @@ impl PythonLspAdapter {
}
#[async_trait]
impl LspAdapter for PythonLspAdapter {
impl LspAdapterTrait for PythonLspAdapter {
async fn name(&self) -> LanguageServerName {
LanguageServerName("pyright".into())
}

View file

@ -14,7 +14,7 @@ use util::ResultExt;
pub struct RustLspAdapter;
#[async_trait]
impl LspAdapter for RustLspAdapter {
impl LspAdapterTrait for RustLspAdapter {
async fn name(&self) -> LanguageServerName {
LanguageServerName("rust-analyzer".into())
}

View file

@ -3,7 +3,7 @@ use anyhow::{anyhow, Context, Result};
use async_trait::async_trait;
use client::http::HttpClient;
use futures::StreamExt;
use language::{LanguageServerName, LspAdapter};
use language::{LanguageServerName, LspAdapter, LspAdapterTrait};
use serde_json::json;
use smol::fs;
use std::{any::Any, path::PathBuf, sync::Arc};
@ -21,7 +21,7 @@ struct Versions {
}
#[async_trait]
impl LspAdapter for TypeScriptLspAdapter {
impl LspAdapterTrait for TypeScriptLspAdapter {
async fn name(&self) -> LanguageServerName {
LanguageServerName("typescript-language-server".into())
}