Show a notification that gopls can't be installed without go

This commit is contained in:
Max Brunsfeld 2023-06-19 16:13:06 -07:00
parent 360bbebbd9
commit 57c2d85c66
4 changed files with 47 additions and 5 deletions

View file

@ -252,7 +252,7 @@ pub enum Event {
LanguageServerAdded(LanguageServerId),
LanguageServerRemoved(LanguageServerId),
LanguageServerLog(LanguageServerId, String),
LanguageServerNotification(String),
Notification(String),
ActiveEntryChanged(Option<ProjectEntryId>),
WorktreeAdded,
WorktreeRemoved(WorktreeId),
@ -7205,9 +7205,8 @@ impl ProjectLspAdapterDelegate {
impl LspAdapterDelegate for ProjectLspAdapterDelegate {
fn show_notification(&self, message: &str, cx: &mut AppContext) {
self.project.update(cx, |_, cx| {
cx.emit(Event::LanguageServerNotification(message.to_owned()))
});
self.project
.update(cx, |_, cx| cx.emit(Event::Notification(message.to_owned())));
}
fn http_client(&self) -> Arc<dyn HttpClient> {