nix: include rust-src so rust-analyzer works correctly.
commit7c99ff58fdc4c5217f86e59d2b3ec0df10f79aaa
authorBlaž Hrastnik <blaz@mxxn.io>
dateTue 19 Jan 2021, 16:16 (6 years ago)
parentf1539cc
helix-core/src/indent.rs+2−2
@@ -135,8 +135,8 @@ fn calculate_indentation(node: Option<Node>, newline: bool) -> usize {
135135 // let len = 1;
136136 // })
137137
138− if ((indent_scopes.contains(&parent_kind) && true) // not_first_or_last_sibling
139− || (indent_except_first_scopes.contains(&parent_kind) && true))
138+ if (indent_scopes.contains(&parent_kind) // && not_first_or_last_sibling
139+ || indent_except_first_scopes.contains(&parent_kind))
140140 && !starts_same_line
141141 {
142142 // println!("is_scope {}", parent_kind);
helix-core/src/position.rs+3−3
@@ -39,9 +39,9 @@ impl From<(usize, usize)> for Position {
3939 }
4040}
4141
42−impl Into<tree_sitter::Point> for Position {
43− fn into(self) -> tree_sitter::Point {
44− tree_sitter::Point::new(self.row, self.col)
42+impl From<Position> for tree_sitter::Point {
43+ fn from(pos: Position) -> Self {
44+ Self::new(pos.row, pos.col)
4545 }
4646}
4747
shell.nix+1−1
@@ -2,7 +2,7 @@
22
33pkgs.mkShell {
44 nativeBuildInputs = with pkgs; [
5− rust-bin.nightly.latest.rust
5+ (rust-bin.nightly.latest.rust.override { extensions = ["rust-src"]; })
66 lld_10
77 # pkgconfig
88 ];