This commit is contained in:
Nathan Sobo 2023-04-11 18:21:56 -06:00
parent 3de8fe0f87
commit e115baa60c
94 changed files with 1477 additions and 1310 deletions

View file

@ -2,7 +2,7 @@ use editor::Editor;
use gpui::{
elements::*,
platform::{CursorStyle, MouseButton},
Entity, RenderContext, Subscription, View, ViewContext, ViewHandle,
Entity, Subscription, View, ViewContext, ViewHandle,
};
use settings::Settings;
use std::sync::Arc;
@ -50,7 +50,7 @@ impl View for ActiveBufferLanguage {
"ActiveBufferLanguage"
}
fn render(&mut self, cx: &mut RenderContext<Self>) -> ElementBox {
fn render(&mut self, cx: &mut ViewContext<Self>) -> ElementBox {
if let Some(active_language) = self.active_language.as_ref() {
let active_language_text = if let Some(active_language_text) = active_language {
active_language_text.to_string()

View file

@ -4,8 +4,8 @@ pub use active_buffer_language::ActiveBufferLanguage;
use editor::Editor;
use fuzzy::{match_strings, StringMatch, StringMatchCandidate};
use gpui::{
actions, elements::*, AnyViewHandle, AppContext, Entity, ModelHandle, MouseState,
RenderContext, View, ViewContext, ViewHandle,
actions, elements::*, AnyViewHandle, AppContext, Entity, ModelHandle, MouseState, View,
ViewContext, ViewHandle,
};
use language::{Buffer, LanguageRegistry};
use picker::{Picker, PickerDelegate};
@ -120,7 +120,7 @@ impl View for LanguageSelector {
"LanguageSelector"
}
fn render(&mut self, cx: &mut RenderContext<Self>) -> ElementBox {
fn render(&mut self, cx: &mut ViewContext<Self>) -> ElementBox {
ChildView::new(&self.picker, cx).boxed()
}