on master help sign in
nix: include rust-src so rust-analyzer works correctly.
7c99ff5Blaž Hrastnik
helix-core/src/indent.rs+2−2
@@ -135,8 +135,8 @@ fn calculate_indentation(node: Option<Node>, newline: bool) -> usize {
135 // let len = 1;
135 // let len = 1;
136 // })
136 // })
137
137
138− if ((indent_scopes.contains(&parent_kind) && true) // not_first_or_last_sibling
138+ if (indent_scopes.contains(&parent_kind) // && not_first_or_last_sibling
139− || (indent_except_first_scopes.contains(&parent_kind) && true))
139+ || indent_except_first_scopes.contains(&parent_kind))
140 && !starts_same_line
140 && !starts_same_line
141 {
141 {
142 // println!("is_scope {}", parent_kind);
142 // println!("is_scope {}", parent_kind);
helix-core/src/position.rs+3−3
@@ -39,9 +39,9 @@ impl From<(usize, usize)> for Position {
39 }
39 }
40}
40}
41
41
42−impl Into<tree_sitter::Point> for Position {
42+impl From<Position> for tree_sitter::Point {
43− fn into(self) -> tree_sitter::Point {
43+ fn from(pos: Position) -> Self {
44− tree_sitter::Point::new(self.row, self.col)
44+ Self::new(pos.row, pos.col)
45 }
45 }
46}
46}
47
47
shell.nix+1−1
@@ -2,7 +2,7 @@
2
2
3pkgs.mkShell {
3pkgs.mkShell {
4 nativeBuildInputs = with pkgs; [
4 nativeBuildInputs = with pkgs; [
5− rust-bin.nightly.latest.rust
5+ (rust-bin.nightly.latest.rust.override { extensions = ["rust-src"]; })
6 lld_10
6 lld_10
7 # pkgconfig
7 # pkgconfig
8 ];
8 ];