Skip to content

Commit

Permalink
nix: include rust-src so rust-analyzer works correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
archseer committed Jan 19, 2021
1 parent f1539cc commit 7c99ff5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions helix-core/src/indent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ fn calculate_indentation(node: Option<Node>, 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);
Expand Down
6 changes: 3 additions & 3 deletions helix-core/src/position.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ impl From<(usize, usize)> for Position {
}
}

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

Expand Down
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
];
Expand Down

0 comments on commit 7c99ff5

Please sign in to comment.