parent
84affa96ff
commit
1f611a9c90
10 changed files with 184 additions and 44 deletions
|
@ -1,5 +1,5 @@
|
|||
use assets::Assets;
|
||||
use gpui::{prelude::*, App, Task, View, WindowOptions};
|
||||
use gpui::{prelude::*, App, KeyBinding, Task, View, WindowOptions};
|
||||
use language::{language_settings::AllLanguageSettings, LanguageRegistry};
|
||||
use markdown::{Markdown, MarkdownStyle};
|
||||
use node_runtime::FakeNodeRuntime;
|
||||
|
@ -91,6 +91,7 @@ pub fn main() {
|
|||
SettingsStore::update(cx, |store, cx| {
|
||||
store.update_user_settings::<AllLanguageSettings>(cx, |_| {});
|
||||
});
|
||||
cx.bind_keys([KeyBinding::new("cmd-c", markdown::Copy, None)]);
|
||||
|
||||
let node_runtime = FakeNodeRuntime::new();
|
||||
let language_registry = Arc::new(LanguageRegistry::new(
|
||||
|
@ -161,7 +162,7 @@ impl MarkdownExample {
|
|||
language_registry: Arc<LanguageRegistry>,
|
||||
cx: &mut WindowContext,
|
||||
) -> Self {
|
||||
let markdown = cx.new_view(|cx| Markdown::new(text, style, language_registry, cx));
|
||||
let markdown = cx.new_view(|cx| Markdown::new(text, style, Some(language_registry), cx));
|
||||
Self { markdown }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue