From 938a710904ae6d328d4008626d98acb9e907813a Mon Sep 17 00:00:00 2001 From: Daniel Ebert Date: Tue, 19 Sep 2023 15:31:38 +0200 Subject: Make the indent heuristic configurable --- helix-term/src/commands.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'helix-term') diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index e557977a..1b8f9e1f 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -3053,6 +3053,7 @@ fn insert_with_indent(cx: &mut Context, cursor_fallback: IndentFallbackPos) { let indent = indent::indent_for_newline( language_config, syntax, + &doc.config.load().indent_heuristic, &doc.indent_style, tab_width, text, @@ -3181,6 +3182,7 @@ fn open(cx: &mut Context, open: Open) { let indent = indent::indent_for_newline( doc.language_config(), doc.syntax(), + &doc.config.load().indent_heuristic, &doc.indent_style, doc.tab_width(), text, @@ -3720,6 +3722,7 @@ pub mod insert { let indent = indent::indent_for_newline( doc.language_config(), doc.syntax(), + &doc.config.load().indent_heuristic, &doc.indent_style, doc.tab_width(), text, -- cgit v1.2.3-70-g09d2