Editor toolbar configuration (#7338)
Adds settings for hiding breadcrumbs and quick action bar from the editor toolbar. If both elements are hidden, the toolbar disappears completely. Example: ```json "toolbar": { "breadcrumbs": true, "quick_actions": false } ``` - It intentionally doesn't hide breadcrumbs in other views (for instance, in the search result window) because their usage there differ from the main editor. - The editor controls how breadcrumbs are displayed in the toolbar, so implementation differs a bit for breadcrumbs and quick actions bar. Release Notes: - Added support for configuring the editor toolbar ([4756](https://github.com/zed-industries/zed/issues/4756))
This commit is contained in:
parent
55185c159b
commit
8da6e62914
10 changed files with 113 additions and 38 deletions
|
@ -353,7 +353,7 @@ fn initialize_pane(workspace: &mut Workspace, pane: &View<Pane>, cx: &mut ViewCo
|
|||
toolbar.add_item(buffer_search_bar.clone(), cx);
|
||||
|
||||
let quick_action_bar =
|
||||
cx.new_view(|_| QuickActionBar::new(buffer_search_bar, workspace));
|
||||
cx.new_view(|cx| QuickActionBar::new(buffer_search_bar, workspace, cx));
|
||||
toolbar.add_item(quick_action_bar, cx);
|
||||
let diagnostic_editor_controls = cx.new_view(|_| diagnostics::ToolbarControls::new());
|
||||
toolbar.add_item(diagnostic_editor_controls, cx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue