Use LanguageServerName in more places (#18167)
This pushes the new LanguageServerName type to more places. As both languages and language servers were identified by Arc<str>, it was sometimes hard to tell which was intended. Release Notes: - N/A
This commit is contained in:
parent
743feb98bc
commit
4f227fd3bf
20 changed files with 150 additions and 85 deletions
|
@ -19,7 +19,10 @@ use workspace::{item::ItemHandle, StatusItemView, Workspace};
|
|||
actions!(activity_indicator, [ShowErrorMessage]);
|
||||
|
||||
pub enum Event {
|
||||
ShowError { lsp_name: Arc<str>, error: String },
|
||||
ShowError {
|
||||
lsp_name: LanguageServerName,
|
||||
error: String,
|
||||
},
|
||||
}
|
||||
|
||||
pub struct ActivityIndicator {
|
||||
|
@ -123,7 +126,7 @@ impl ActivityIndicator {
|
|||
self.statuses.retain(|status| {
|
||||
if let LanguageServerBinaryStatus::Failed { error } = &status.status {
|
||||
cx.emit(Event::ShowError {
|
||||
lsp_name: status.name.0.clone(),
|
||||
lsp_name: status.name.clone(),
|
||||
error: error.clone(),
|
||||
});
|
||||
false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue