Skip to content

Commit 1c613e6

Browse files
maxbrunsfeldnoaccOS
authored andcommitted
Fix some issues with branch buffers (zed-industries#18945)
* `Open Excerpts` command always opens the locations in the base buffer * LSP features like document-highlights, go-to-def, and inlay hints work correctly in branch buffers * Other LSP features like completions, code actions, and rename are disabled in branch buffers Release Notes: - N/A
1 parent c249c4e commit 1c613e6

File tree

13 files changed

+555
-268
lines changed

13 files changed

+555
-268
lines changed

crates/assistant/src/assistant_panel.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1560,7 +1560,7 @@ impl ContextEditor {
15601560
editor.set_show_runnables(false, cx);
15611561
editor.set_show_wrap_guides(false, cx);
15621562
editor.set_show_indent_guides(false, cx);
1563-
editor.set_completion_provider(Box::new(completion_provider));
1563+
editor.set_completion_provider(Some(Box::new(completion_provider)));
15641564
editor.set_collaboration_hub(Box::new(project.clone()));
15651565
editor
15661566
});

crates/assistant/src/prompt_library.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,9 +521,9 @@ impl PromptLibrary {
521521
editor.set_show_indent_guides(false, cx);
522522
editor.set_use_modal_editing(false);
523523
editor.set_current_line_highlight(Some(CurrentLineHighlight::None));
524-
editor.set_completion_provider(Box::new(
524+
editor.set_completion_provider(Some(Box::new(
525525
SlashCommandCompletionProvider::new(None, None),
526-
));
526+
)));
527527
if focus {
528528
editor.focus(cx);
529529
}

crates/collab_ui/src/chat_panel/message_editor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ impl MessageEditor {
111111
editor.set_show_gutter(false, cx);
112112
editor.set_show_wrap_guides(false, cx);
113113
editor.set_show_indent_guides(false, cx);
114-
editor.set_completion_provider(Box::new(MessageEditorCompletionProvider(this)));
114+
editor.set_completion_provider(Some(Box::new(MessageEditorCompletionProvider(this))));
115115
editor.set_auto_replace_emoji_shortcode(
116116
MessageEditorSettings::get_global(cx)
117117
.auto_replace_emoji_shortcode

0 commit comments

Comments
 (0)