Merge pull request #2263 from zed-industries/language-status-bar
Language status bar
This commit is contained in:
commit
30a08467b0
12 changed files with 183 additions and 35 deletions
|
@ -340,14 +340,16 @@ pub fn initialize_workspace(
|
|||
cx.add_view(|cx| diagnostics::items::DiagnosticIndicator::new(workspace.project(), cx));
|
||||
let activity_indicator =
|
||||
activity_indicator::ActivityIndicator::new(workspace, app_state.languages.clone(), cx);
|
||||
let cursor_position = cx.add_view(|_| editor::items::CursorPosition::new());
|
||||
let active_buffer_language = cx.add_view(|_| language_selector::ActiveBufferLanguage::new());
|
||||
let feedback_button =
|
||||
cx.add_view(|_| feedback::deploy_feedback_button::DeployFeedbackButton {});
|
||||
cx.add_view(|_| feedback::deploy_feedback_button::DeployFeedbackButton::new());
|
||||
let cursor_position = cx.add_view(|_| editor::items::CursorPosition::new());
|
||||
workspace.status_bar().update(cx, |status_bar, cx| {
|
||||
status_bar.add_left_item(diagnostic_summary, cx);
|
||||
status_bar.add_left_item(activity_indicator, cx);
|
||||
status_bar.add_right_item(cursor_position, cx);
|
||||
status_bar.add_right_item(feedback_button, cx);
|
||||
status_bar.add_right_item(active_buffer_language, cx);
|
||||
status_bar.add_right_item(cursor_position, cx);
|
||||
});
|
||||
|
||||
auto_update::notify_of_any_new_update(cx.weak_handle(), cx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue