From 83c307a66a05644c95c3864b3a79293d92f0b176 Mon Sep 17 00:00:00 2001 From: David Else <12832280+David-Else@users.noreply.github.com> Date: Wed, 19 Apr 2023 22:56:18 +0000 Subject: [PATCH] Improve and update the installation documentation (#6809) --- book/src/install.md | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/book/src/install.md b/book/src/install.md index 5f1651ae9..169e6e0b6 100644 --- a/book/src/install.md +++ b/book/src/install.md @@ -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 @@ -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 @@ -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 @@ -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 @@ -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)).