Skip to content

Commit bcd6453

Browse files
committed
support use diff algorithm for formatting
1 parent e556d72 commit bcd6453

File tree

3 files changed

+410
-6
lines changed

3 files changed

+410
-6
lines changed

crates/emmylua_code_analysis/src/config/configs/reformat.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ pub struct EmmyrcReformat {
77
/// Whether to enable internal code reformatting.
88
#[serde(default)]
99
pub external_tool: Option<EmmyrcExternalTool>,
10+
11+
/// Whether to use the diff algorithm for formatting.
12+
#[serde(default = "default_false")]
13+
pub use_diff: bool,
1014
}
1115

1216
#[derive(Serialize, Deserialize, Debug, JsonSchema, Clone, Default)]
@@ -25,3 +29,7 @@ pub struct EmmyrcExternalTool {
2529
fn default_timeout() -> u64 {
2630
5000
2731
}
32+
33+
fn default_false() -> bool {
34+
false
35+
}

0 commit comments

Comments
 (0)