WIP - Improve project diagnostic context rendering
This commit is contained in:
parent
fb492a9fb8
commit
528d64d3cc
5 changed files with 225 additions and 114 deletions
|
@ -357,7 +357,7 @@ pub enum SoftWrap {
|
|||
Column(u32),
|
||||
}
|
||||
|
||||
type BuildSettings = Arc<dyn 'static + Send + Sync + Fn(&AppContext) -> EditorSettings>;
|
||||
pub type BuildSettings = Arc<dyn 'static + Send + Sync + Fn(&AppContext) -> EditorSettings>;
|
||||
|
||||
pub struct Editor {
|
||||
handle: WeakViewHandle<Self>,
|
||||
|
@ -3794,6 +3794,14 @@ pub fn diagnostic_header_renderer(
|
|||
})
|
||||
}
|
||||
|
||||
pub fn context_header_renderer(build_settings: BuildSettings) -> RenderHeaderFn {
|
||||
Arc::new(move |cx| {
|
||||
let settings = build_settings(cx);
|
||||
let text_style = settings.style.text.clone();
|
||||
Text::new("...".to_string(), text_style).boxed()
|
||||
})
|
||||
}
|
||||
|
||||
pub fn diagnostic_style(
|
||||
severity: DiagnosticSeverity,
|
||||
valid: bool,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue