feat: add markdown text view
This commit is contained in:
+1018
-103
File diff suppressed because it is too large
Load Diff
@@ -1,24 +1,24 @@
|
||||
//! Shared helpers for the editor's views: gutter cells, role colors and run
|
||||
//! styles, code line text, language mapping and change washes.
|
||||
|
||||
#[cfg(feature = "markdown_view")]
|
||||
#[cfg(any(feature = "code_view", feature = "markdown_view"))]
|
||||
use std::ops::Range;
|
||||
|
||||
#[cfg(feature = "markdown_view")]
|
||||
use crate::highlight::{Language, Line};
|
||||
#[cfg(feature = "markdown_view")]
|
||||
use gpui::StyledText;
|
||||
#[cfg(feature = "code_view")]
|
||||
#[cfg(any(feature = "code_view", feature = "markdown_view"))]
|
||||
use gpui::{App, HighlightStyle, Hsla, IntoElement, ParentElement as _, Styled as _, div};
|
||||
#[cfg(feature = "code_view")]
|
||||
#[cfg(any(feature = "code_view", feature = "markdown_view"))]
|
||||
use gpui_native_theme::{ActiveTheme as _, ColorTokens, Ramps};
|
||||
#[cfg(feature = "diff_view")]
|
||||
use gpui_native_theme::{WASH_ALPHA, WASH_ALPHA_GUTTER, WASH_ALPHA_STRONG};
|
||||
|
||||
#[cfg(feature = "code_view")]
|
||||
#[cfg(any(feature = "code_view", feature = "markdown_view"))]
|
||||
use crate::highlight::Role;
|
||||
|
||||
#[cfg(feature = "code_view")]
|
||||
#[cfg(any(feature = "code_view", feature = "markdown_view"))]
|
||||
impl Role {
|
||||
/// Maps the role to the theme's semantic palette.
|
||||
pub(crate) fn color(self, colors: ColorTokens, ramps: Ramps) -> Hsla {
|
||||
|
||||
Reference in New Issue
Block a user