From 6764744ce9912a1f48502bf5ee025283e12fded5 Mon Sep 17 00:00:00 2001 From: Robin Date: Mon, 3 Oct 2022 17:07:04 +0200 Subject: Add option to skip the first indent guide (#3819) * Add option to skip the first indent guide * reorder skip_first option * change indent-guides.skip_first to a number * rename skip -> skip_levels * add skip_levels to the book * Update book/src/configuration.md Co-authored-by: A-Walrus <58790821+A-Walrus@users.noreply.github.com> * Update helix-term/src/ui/editor.rs Co-authored-by: Michael Davis Co-authored-by: Robin Co-authored-by: A-Walrus <58790821+A-Walrus@users.noreply.github.com> Co-authored-by: Michael Davis --- helix-term/src/ui/editor.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'helix-term/src/ui') diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index 0269d804..e5dc3c95 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -436,7 +436,8 @@ impl EditorView { return; } - let starting_indent = (offset.col / tab_width) as u16; + let starting_indent = + (offset.col / tab_width) as u16 + config.indent_guides.skip_levels; // TODO: limit to a max indent level too. It doesn't cause visual artifacts but it would avoid some // extra loops if the code is deeply nested. -- cgit v1.2.3-70-g09d2