Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Merge remote-tracking branch 'origin/main' into chat-font-size

Conrad Irwin29ac1fd08141
diff --cc crates/collab_ui/src/chat_panel/message_editor.rs
index 41d2c26f49a,48d3f31aa90..9bbf512877c
--- a/crates/collab_ui/src/chat_panel/message_editor.rs
+++ b/crates/collab_ui/src/chat_panel/message_editor.rs
@@@ -8,12 -8,17 +8,17 @@@ use gpui::
AsyncWindowContext, FocusableView, FontStyle, FontWeight, HighlightStyle, IntoElement, Model,
Render, SharedString, Task, TextStyle, View, ViewContext, WeakView, WhiteSpace,
};
- use language::{language_settings::SoftWrap, Buffer, BufferSnapshot, LanguageRegistry};
+ use language::{
+ language_settings::SoftWrap, Anchor, Buffer, BufferSnapshot, CodeLabel, Completion,
+ LanguageRegistry, LanguageServerId, ToOffset,
+ };
use lazy_static::lazy_static;
+ use parking_lot::RwLock;
use project::search::SearchQuery;
use settings::Settings;
+ use std::{sync::Arc, time::Duration};
use theme::ThemeSettings;
-use ui::prelude::*;
+use ui::{prelude::*, UiTextSize};
const MENTIONS_DEBOUNCE_INTERVAL: Duration = Duration::from_millis(50);
@@@ -38,9 -80,10 +80,11 @@@ impl MessageEditor
editor: View<Editor>,
cx: &mut ViewContext<Self>,
) -> Self {
+ let this = cx.view().downgrade();
editor.update(cx, |editor, cx| {
editor.set_soft_wrap_mode(SoftWrap::EditorWidth, cx);
+ editor.set_use_autoclose(false);
+ editor.set_completion_provider(Box::new(MessageEditorCompletionProvider(this)));
});
let buffer = editor