Add Editor Controls Menu to Tool Bar (#10655)
This PR adds an editor controls menu to the tool bar. This menu will be used to contain controls that toggle visual features in the editor, like toggling inlay hints, showing git status or blame, hiding the gutter, hiding or showing elements in the tool bar, etc. For the moment, this consolidates the new Inline Git Blame toggle and the old Inlay Hints toggle. In the future it will contain additional controls. Before:  After:  --- Release Notes: - Added an editor controls menu to the tool bar. This will contain visual, editor-specific options like toggling inlay hints, showing git status or blame, etc. - Removed the top level inlay hint toggle from the tool bar due to the above change. - Added the ability to toggle inline git blame from the new editor controls menu. --------- Co-authored-by: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
This commit is contained in:
co-authored by
Marshall Bowers
parent
775539b3fa
commit
e93d554725
@@ -8889,6 +8889,10 @@ impl Editor {
|
||||
cx.notify();
|
||||
}
|
||||
|
||||
pub fn git_blame_inline_enabled(&self) -> bool {
|
||||
self.git_blame_inline_enabled
|
||||
}
|
||||
|
||||
fn start_git_blame(&mut self, user_triggered: bool, cx: &mut ViewContext<Self>) {
|
||||
if let Some(project) = self.project.as_ref() {
|
||||
let Some(buffer) = self.buffer().read(cx).as_singleton() else {
|
||||
|
||||
Reference in New Issue
Block a user