nix: include rust-src so rust-analyzer works correctly.

pull/8/head
Blaž Hrastnik 3 years ago
parent f1539cc866
commit 7c99ff58fd

@ -135,8 +135,8 @@ fn calculate_indentation(node: Option<Node>, newline: bool) -> usize {
// let len = 1; // let len = 1;
// }) // })
if ((indent_scopes.contains(&parent_kind) && true) // not_first_or_last_sibling if (indent_scopes.contains(&parent_kind) // && not_first_or_last_sibling
|| (indent_except_first_scopes.contains(&parent_kind) && true)) || indent_except_first_scopes.contains(&parent_kind))
&& !starts_same_line && !starts_same_line
{ {
// println!("is_scope {}", parent_kind); // println!("is_scope {}", parent_kind);

@ -39,9 +39,9 @@ impl From<(usize, usize)> for Position {
} }
} }
impl Into<tree_sitter::Point> for Position { impl From<Position> for tree_sitter::Point {
fn into(self) -> tree_sitter::Point { fn from(pos: Position) -> Self {
tree_sitter::Point::new(self.row, self.col) Self::new(pos.row, pos.col)
} }
} }

@ -2,7 +2,7 @@
pkgs.mkShell { pkgs.mkShell {
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
rust-bin.nightly.latest.rust (rust-bin.nightly.latest.rust.override { extensions = ["rust-src"]; })
lld_10 lld_10
# pkgconfig # pkgconfig
]; ];

Loading…
Cancel
Save