diff options
Diffstat (limited to 'helix-core/src/indent.rs')
-rw-r--r-- | helix-core/src/indent.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/helix-core/src/indent.rs b/helix-core/src/indent.rs index 8e0379e2..81bdffc0 100644 --- a/helix-core/src/indent.rs +++ b/helix-core/src/indent.rs @@ -1,13 +1,13 @@ use crate::{ find_first_non_whitespace_char, syntax::{IndentQuery, LanguageConfiguration, Syntax}, - tree_sitter::{Node, Tree}, - Rope, RopeSlice, + tree_sitter::Node, + RopeSlice, }; /// To determine indentation of a newly inserted line, figure out the indentation at the last col /// of the previous line. - +#[allow(dead_code)] fn indent_level_for_line(line: RopeSlice, tab_width: usize) -> usize { let mut len = 0; for ch in line.chars() { @@ -98,12 +98,13 @@ fn calculate_indentation(query: &IndentQuery, node: Option<Node>, newline: bool) increment as usize } +#[allow(dead_code)] fn suggested_indent_for_line( language_config: &LanguageConfiguration, syntax: Option<&Syntax>, text: RopeSlice, line_num: usize, - tab_width: usize, + _tab_width: usize, ) -> usize { if let Some(start) = find_first_non_whitespace_char(text.line(line_num)) { return suggested_indent_for_pos( @@ -150,6 +151,7 @@ pub fn suggested_indent_for_pos( #[cfg(test)] mod test { use super::*; + use crate::Rope; #[test] fn test_indent_level() { |