summaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
authorSkyler Hawthorne2023-03-01 04:57:36 +0000
committerMichael Davis2023-03-20 23:34:40 +0000
commita264faa98d348a13318f9ccbb0d979882a112654 (patch)
tree8a429461db618358d5e8732a7f33976ab761f975 /helix-term
parent1db252913b427c806f89972edf1df6c80bc37fe6 (diff)
refactor test editor config
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/tests/test/helpers.rs18
1 files changed, 11 insertions, 7 deletions
diff --git a/helix-term/tests/test/helpers.rs b/helix-term/tests/test/helpers.rs
index 811f7848..de81f758 100644
--- a/helix-term/tests/test/helpers.rs
+++ b/helix-term/tests/test/helpers.rs
@@ -232,15 +232,19 @@ pub fn temp_file_with_contents<S: AsRef<str>>(
/// Generates a config with defaults more suitable for integration tests
pub fn test_config() -> Config {
merge_keys(Config {
- editor: helix_view::editor::Config {
- lsp: LspConfig {
- enable: false,
- ..Default::default()
- },
+ editor: test_editor_config(),
+ ..Default::default()
+ })
+}
+
+pub fn test_editor_config() -> helix_view::editor::Config {
+ helix_view::editor::Config {
+ lsp: LspConfig {
+ enable: false,
..Default::default()
},
..Default::default()
- })
+ }
}
/// Replaces all LF chars with the system's appropriate line feed
@@ -282,7 +286,7 @@ impl Default for AppBuilder {
fn default() -> Self {
Self {
args: Args::default(),
- config: Config::default(),
+ config: test_config(),
syn_conf: test_syntax_conf(None),
input: None,
}