diff --git a/helix-core/src/indent.rs b/helix-core/src/indent.rs index d75038d2f..e708b3173 100644 --- a/helix-core/src/indent.rs +++ b/helix-core/src/indent.rs @@ -135,8 +135,8 @@ fn calculate_indentation(node: Option, newline: bool) -> usize { // let len = 1; // }) - if ((indent_scopes.contains(&parent_kind) && true) // not_first_or_last_sibling - || (indent_except_first_scopes.contains(&parent_kind) && true)) + if (indent_scopes.contains(&parent_kind) // && not_first_or_last_sibling + || indent_except_first_scopes.contains(&parent_kind)) && !starts_same_line { // println!("is_scope {}", parent_kind); diff --git a/helix-core/src/position.rs b/helix-core/src/position.rs index 8bc480948..5e5f902bd 100644 --- a/helix-core/src/position.rs +++ b/helix-core/src/position.rs @@ -39,9 +39,9 @@ fn from(tuple: (usize, usize)) -> Self { } } -impl Into for Position { - fn into(self) -> tree_sitter::Point { - tree_sitter::Point::new(self.row, self.col) +impl From for tree_sitter::Point { + fn from(pos: Position) -> Self { + Self::new(pos.row, pos.col) } } diff --git a/shell.nix b/shell.nix index f8f65093d..e0a260456 100644 --- a/shell.nix +++ b/shell.nix @@ -2,7 +2,7 @@ pkgs.mkShell { nativeBuildInputs = with pkgs; [ - rust-bin.nightly.latest.rust + (rust-bin.nightly.latest.rust.override { extensions = ["rust-src"]; }) lld_10 # pkgconfig ];