Allow copy-pasting dev-server-token (#11992)

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2024-05-17 16:41:46 -06:00 committed by GitHub
parent 84affa96ff
commit 1f611a9c90
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 184 additions and 44 deletions

View file

@ -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 }
}
}