
This PR contains various improvements for the markdown preview (some of which were originally part of #7601). Some improvements can be seen in the video (see also release notes down below): https://github.com/zed-industries/zed/assets/53836821/93324ee8-d366-464a-9728-981eddbfdaf7 Release Notes: - Added action to open markdown preview in the same pane - Added support for displaying channel notes in markdown preview - Added support for displaying the current active editor when opening markdown preview - Added support for scrolling the editor to the corresponding block when double clicking an element in markdown preview - Improved pane creation handling when opening markdown preview - Fixed markdown preview displaying non-markdown files
16 lines
424 B
Rust
16 lines
424 B
Rust
use gpui::{actions, AppContext};
|
|
use workspace::Workspace;
|
|
|
|
pub mod markdown_elements;
|
|
pub mod markdown_parser;
|
|
pub mod markdown_preview_view;
|
|
pub mod markdown_renderer;
|
|
|
|
actions!(markdown, [OpenPreview, OpenPreviewToTheSide]);
|
|
|
|
pub fn init(cx: &mut AppContext) {
|
|
cx.observe_new_views(|workspace: &mut Workspace, cx| {
|
|
markdown_preview_view::MarkdownPreviewView::register(workspace, cx);
|
|
})
|
|
.detach();
|
|
}
|