Merge pull request #2417 from zed-industries/hover-markdown

Render markdown more correctly in the editor hover popover
This commit is contained in:
Max Brunsfeld 2023-04-27 14:15:04 -07:00 committed by GitHub
commit 7258db7a4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 827 additions and 307 deletions

View file

@ -463,6 +463,7 @@ pub struct EditorStyle {
pub text: TextStyle,
pub placeholder_text: Option<TextStyle>,
pub theme: theme::Editor,
pub theme_id: usize,
}
type CompletionId = usize;
@ -7310,6 +7311,7 @@ fn build_style(
) -> EditorStyle {
let font_cache = cx.font_cache();
let theme_id = settings.theme.meta.id;
let mut theme = settings.theme.editor.clone();
let mut style = if let Some(get_field_editor_theme) = get_field_editor_theme {
let field_editor_theme = get_field_editor_theme(&settings.theme);
@ -7323,6 +7325,7 @@ fn build_style(
text: field_editor_theme.text,
placeholder_text: field_editor_theme.placeholder_text,
theme,
theme_id,
}
} else {
let font_family_id = settings.buffer_font_family;
@ -7344,6 +7347,7 @@ fn build_style(
},
placeholder_text: None,
theme,
theme_id,
}
};