mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-26 20:22:30 +00:00
Remove some status stuff
This commit is contained in:
parent
3302e1133f
commit
374c1a3a3e
3 changed files with 4 additions and 10 deletions
|
@ -203,14 +203,12 @@ impl ActivityIndicator {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show any language server installation info.
|
// Show any language server installation info.
|
||||||
let mut validating = SmallVec::<[_; 3]>::new();
|
|
||||||
let mut downloading = SmallVec::<[_; 3]>::new();
|
let mut downloading = SmallVec::<[_; 3]>::new();
|
||||||
let mut checking_for_update = SmallVec::<[_; 3]>::new();
|
let mut checking_for_update = SmallVec::<[_; 3]>::new();
|
||||||
let mut failed = SmallVec::<[_; 3]>::new();
|
let mut failed = SmallVec::<[_; 3]>::new();
|
||||||
for status in &self.statuses {
|
for status in &self.statuses {
|
||||||
let name = status.name.clone();
|
let name = status.name.clone();
|
||||||
match status.status {
|
match status.status {
|
||||||
LanguageServerBinaryStatus::Validating => validating.push(name),
|
|
||||||
LanguageServerBinaryStatus::CheckingForUpdate => checking_for_update.push(name),
|
LanguageServerBinaryStatus::CheckingForUpdate => checking_for_update.push(name),
|
||||||
LanguageServerBinaryStatus::Downloading => downloading.push(name),
|
LanguageServerBinaryStatus::Downloading => downloading.push(name),
|
||||||
LanguageServerBinaryStatus::Failed { .. } => failed.push(name),
|
LanguageServerBinaryStatus::Failed { .. } => failed.push(name),
|
||||||
|
@ -242,7 +240,7 @@ impl ActivityIndicator {
|
||||||
),
|
),
|
||||||
on_click: None,
|
on_click: None,
|
||||||
};
|
};
|
||||||
} else if !failed.is_empty() || !validating.is_empty() {
|
} else if !failed.is_empty() {
|
||||||
return Content {
|
return Content {
|
||||||
icon: Some(WARNING_ICON),
|
icon: Some(WARNING_ICON),
|
||||||
message: format!(
|
message: format!(
|
||||||
|
|
|
@ -536,7 +536,6 @@ struct BracketConfig {
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub enum LanguageServerBinaryStatus {
|
pub enum LanguageServerBinaryStatus {
|
||||||
Validating,
|
|
||||||
CheckingForUpdate,
|
CheckingForUpdate,
|
||||||
Downloading,
|
Downloading,
|
||||||
Downloaded,
|
Downloaded,
|
||||||
|
|
|
@ -280,8 +280,6 @@ pub enum Event {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum LanguageServerState {
|
pub enum LanguageServerState {
|
||||||
Validating(Task<Option<Arc<LanguageServer>>>),
|
|
||||||
|
|
||||||
Starting(Task<Option<Arc<LanguageServer>>>),
|
Starting(Task<Option<Arc<LanguageServer>>>),
|
||||||
|
|
||||||
Running {
|
Running {
|
||||||
|
@ -2485,7 +2483,7 @@ impl Project {
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
this.update(&mut cx, |_, cx| {
|
this.update(&mut cx, |_, cx| {
|
||||||
Self::check_errored_server_id(
|
Self::check_errored_server(
|
||||||
language,
|
language,
|
||||||
adapter,
|
adapter,
|
||||||
server_id,
|
server_id,
|
||||||
|
@ -2935,7 +2933,6 @@ impl Project {
|
||||||
let mut root_path = None;
|
let mut root_path = None;
|
||||||
|
|
||||||
let server = match server_state {
|
let server = match server_state {
|
||||||
Some(LanguageServerState::Validating(task)) => task.await,
|
|
||||||
Some(LanguageServerState::Starting(task)) => task.await,
|
Some(LanguageServerState::Starting(task)) => task.await,
|
||||||
Some(LanguageServerState::Running { server, .. }) => Some(server),
|
Some(LanguageServerState::Running { server, .. }) => Some(server),
|
||||||
None => None,
|
None => None,
|
||||||
|
@ -3047,7 +3044,7 @@ impl Project {
|
||||||
.detach();
|
.detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
fn check_errored_server_id(
|
fn check_errored_server(
|
||||||
language: Arc<Language>,
|
language: Arc<Language>,
|
||||||
adapter: Arc<CachedLspAdapter>,
|
adapter: Arc<CachedLspAdapter>,
|
||||||
server_id: LanguageServerId,
|
server_id: LanguageServerId,
|
||||||
|
@ -7391,7 +7388,7 @@ impl Entity for Project {
|
||||||
use LanguageServerState::*;
|
use LanguageServerState::*;
|
||||||
match server_state {
|
match server_state {
|
||||||
Running { server, .. } => server.shutdown()?.await,
|
Running { server, .. } => server.shutdown()?.await,
|
||||||
Starting(task) | Validating(task) => task.await?.shutdown()?.await,
|
Starting(task) => task.await?.shutdown()?.await,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
Loading…
Reference in a new issue