Skip to content

Commit

Permalink
Improve and update the installation documentation (helix-editor#6809)
Browse files Browse the repository at this point in the history
  • Loading branch information
David-Else authored and wes-adams committed Jul 3, 2023
1 parent 1d0f081 commit bdde8e3
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions book/src/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ line.

## Linux, macOS, Windows and OpenBSD packaging status

Helix is available for Linux, macOS and Windows via the official repositories listed below.

[![Packaging status](https://repology.org/badge/vertical-allrepos/helix.svg)](https://repology.org/project/helix/versions)

## Linux
Expand All @@ -51,7 +49,7 @@ The following third party repositories are available:

### Ubuntu

Helix is available via [Maveonair's PPA](https://launchpad.net/~maveonair/+archive/ubuntu/helix-editor):
Add the `PPA` for Helix:

```sh
sudo add-apt-repository ppa:maveonair/helix-editor
Expand All @@ -61,7 +59,7 @@ sudo apt install helix

### Fedora/RHEL

Helix is available via `copr`:
Enable the `COPR` repository for Helix:

```sh
sudo dnf copr enable varlad/helix
Expand Down Expand Up @@ -92,8 +90,8 @@ If you are using a version of Nix without flakes enabled,

### AppImage

Install Helix using [AppImage](https://appimage.org/).
Download Helix AppImage from the [latest releases](https://github.com/helix-editor/helix/releases/latest) page.
Install Helix using the Linux [AppImage](https://appimage.org/) format.
Download the official Helix AppImage from the [latest releases](https://github.com/helix-editor/helix/releases/latest) page.

```sh
chmod +x helix-*.AppImage # change permission for executable mode
Expand Down Expand Up @@ -143,33 +141,37 @@ pacman -S mingw-w64-ucrt-x86_64-helix

## Building from source

Clone the repository:
Requirements:

- The [Rust toolchain](https://www.rust-lang.org/tools/install)
- The [Git version control system](https://git-scm.com/)
- A c++14 compatible compiler to build the tree-sitter grammars, for example GCC or Clang

If you are using the `musl-libc` standard library instead of `glibc` the following environment variable must be set during the build to ensure tree-sitter grammars can be loaded correctly:

```sh
RUSTFLAGS="-C target-feature=-crt-static"
```

1. Clone the repository:

```sh
git clone https://github.com/helix-editor/helix
cd helix
```

Compile from source:
2. Compile from source:

```sh
cargo install --path helix-term --locked
```

This command will create the `hx` executable and construct the tree-sitter
grammars in the local `runtime` folder. To build the tree-sitter grammars requires
a c++ compiler to be installed, for example `gcc-c++`.

> 💡 If you are using the musl-libc instead of glibc the following environment variable must be set during the build
> to ensure tree-sitter grammars can be loaded correctly:
>
> ```sh
> RUSTFLAGS="-C target-feature=-crt-static"
> ```
grammars in the local `runtime` folder.

> 💡 Tree-sitter grammars can be fetched and compiled if not pre-packaged. Fetch
> grammars with `hx --grammar fetch` (requires `git`) and compile them with
> `hx --grammar build` (requires a C++ compiler). This will install them in
> grammars with `hx --grammar fetch` and compile them with
> `hx --grammar build`. This will install them in
> the `runtime` directory within the user's helix config directory (more
> [details below](#multiple-runtime-directories)).
Expand Down

0 comments on commit bdde8e3

Please sign in to comment.