Define workspace settings in workspace crate
This commit is contained in:
parent
cbd4771f10
commit
6403bb86e1
22 changed files with 253 additions and 243 deletions
|
@ -6685,6 +6685,7 @@ pub(crate) fn init_test(cx: &mut TestAppContext, f: fn(&mut AllLanguageSettingsC
|
|||
language::init(cx);
|
||||
crate::init(cx);
|
||||
Project::init_settings(cx);
|
||||
workspace::init_settings(cx);
|
||||
});
|
||||
|
||||
update_test_settings(cx, f);
|
||||
|
|
|
@ -40,7 +40,7 @@ use language::{
|
|||
Selection,
|
||||
};
|
||||
use project::ProjectPath;
|
||||
use settings::{GitGutter, Settings};
|
||||
use settings::Settings;
|
||||
use smallvec::SmallVec;
|
||||
use std::{
|
||||
borrow::Cow,
|
||||
|
@ -50,7 +50,7 @@ use std::{
|
|||
ops::Range,
|
||||
sync::Arc,
|
||||
};
|
||||
use workspace::item::Item;
|
||||
use workspace::{item::Item, GitGutterSetting, WorkspaceSettings};
|
||||
|
||||
enum FoldMarkers {}
|
||||
|
||||
|
@ -550,11 +550,11 @@ impl EditorElement {
|
|||
let scroll_top = scroll_position.y() * line_height;
|
||||
|
||||
let show_gutter = matches!(
|
||||
&cx.global::<Settings>()
|
||||
.git_overrides
|
||||
settings::get_setting::<WorkspaceSettings>(None, cx)
|
||||
.git
|
||||
.git_gutter
|
||||
.unwrap_or_default(),
|
||||
GitGutter::TrackedFiles
|
||||
GitGutterSetting::TrackedFiles
|
||||
);
|
||||
|
||||
if show_gutter {
|
||||
|
|
|
@ -41,6 +41,7 @@ impl<'a> EditorLspTestContext<'a> {
|
|||
crate::init(cx);
|
||||
pane::init(cx);
|
||||
Project::init_settings(cx);
|
||||
workspace::init_settings(cx);
|
||||
});
|
||||
|
||||
let file_name = format!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue