From 2b0bb936e9f857eddb8123fd913a5c82d916cfe5 Mon Sep 17 00:00:00 2001 From: kazimir-malevich Date: Thu, 6 Apr 2023 14:56:25 +0100 Subject: [PATCH 1/9] runtime config made clearer --- book/src/install.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/book/src/install.md b/book/src/install.md index a0e24de72371..8fecfacc9238 100644 --- a/book/src/install.md +++ b/book/src/install.md @@ -168,16 +168,18 @@ a c++ compiler to be installed, for example `gcc-c++`. #### Linux and macOS -Either set the `HELIX_RUNTIME` environment variable to point to the runtime files and add it to your `~/.bashrc` or equivalent: +The **runtime** directory is in the helix repository cloned root, so either +set the `HELIX_RUNTIME` environment variable to point to the runtime files and +add it to your `~/.bashrc` or equivalent: ```sh -HELIX_RUNTIME=/home/user-name/src/helix/runtime +HELIX_RUNTIME=/runtime ``` -Or, create a symlink in `~/.config/helix` that links to the source code directory: +Or, create a symlink from the Helix repository root runtime directory. ```sh -ln -s $PWD/runtime ~/.config/helix/runtime +ln -s /runtime ~/.config/helix/runtime ``` #### Windows From ff837b0b13f974d255a8664be077c117c6f7726f Mon Sep 17 00:00:00 2001 From: kazimir-malevich Date: Fri, 7 Apr 2023 08:54:48 +0100 Subject: [PATCH 2/9] following Unix FHS --- book/src/install.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/book/src/install.md b/book/src/install.md index 8fecfacc9238..30808b337c3c 100644 --- a/book/src/install.md +++ b/book/src/install.md @@ -134,10 +134,10 @@ pacman -S mingw-w64-ucrt-x86_64-helix ## Building from source -Clone the repository: +According to the Unix Filesystem Hierarchy Standard the helix source can be installed in **/usr/local/src**. ```sh -git clone https://github.com/helix-editor/helix +git clone https://github.com/helix-editor/helix /usr/local/src cd helix ``` @@ -151,6 +151,16 @@ 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++`. +To test for an installed `gcc-c++` on your Unix distribution try: + +```sh +$ g++ --version + +g++ (Debian 10.2.1-6) 10.2.1 20210110 +Copyright (C) 2020 Free Software Foundation, Inc. +... +``` + > 💡 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: > @@ -173,13 +183,13 @@ set the `HELIX_RUNTIME` environment variable to point to the runtime files and add it to your `~/.bashrc` or equivalent: ```sh -HELIX_RUNTIME=/runtime +HELIX_RUNTIME=/usr/local/src/helix/runtime ``` Or, create a symlink from the Helix repository root runtime directory. ```sh -ln -s /runtime ~/.config/helix/runtime +ln -s /usr/local/src/helix/runtime ~/.config/helix/runtime ``` #### Windows From 1af0b5559f6093b338f91cb1f1d51d60998111cf Mon Sep 17 00:00:00 2001 From: kazimir-malevich Date: Fri, 7 Apr 2023 11:34:52 +0100 Subject: [PATCH 3/9] we probably want to install Helix as a regular user without sudo access --- book/src/install.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/book/src/install.md b/book/src/install.md index 30808b337c3c..75389397ef7e 100644 --- a/book/src/install.md +++ b/book/src/install.md @@ -134,11 +134,15 @@ pacman -S mingw-w64-ucrt-x86_64-helix ## Building from source -According to the Unix Filesystem Hierarchy Standard the helix source can be installed in **/usr/local/src**. +According to the Unix Filesystem Hierarchy Standard the Helix source can be +installed in **/usr/local/src** or **/opt**, however we would prefer to install +Helix as a regular user without **sudo** access, so we can create a +**$HOME/src** directory. ```sh -git clone https://github.com/helix-editor/helix /usr/local/src -cd helix +mkdir $HOME/src +git clone https://github.com/helix-editor/helix $HOME/src/helix +cd $HOME/src/helix ``` Compile from source: @@ -178,18 +182,18 @@ Copyright (C) 2020 Free Software Foundation, Inc. #### Linux and macOS -The **runtime** directory is in the helix repository cloned root, so either +The **runtime** directory is in the Helix repository cloned root, so either set the `HELIX_RUNTIME` environment variable to point to the runtime files and add it to your `~/.bashrc` or equivalent: ```sh -HELIX_RUNTIME=/usr/local/src/helix/runtime +HELIX_RUNTIME=$HOME/src/helix/runtime ``` Or, create a symlink from the Helix repository root runtime directory. ```sh -ln -s /usr/local/src/helix/runtime ~/.config/helix/runtime +ln -s $HOME/src/helix/runtime ~/.config/helix/runtime ``` #### Windows From 2c7caf1c38d67ac879e2c21ef2fe3cd65b5e3ba4 Mon Sep 17 00:00:00 2001 From: kazimir-malevich Date: Wed, 12 Apr 2023 16:22:21 +0100 Subject: [PATCH 4/9] suggestions adopted from @the-mikedavis --- book/src/install.md | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/book/src/install.md b/book/src/install.md index 75389397ef7e..6d83306bb56a 100644 --- a/book/src/install.md +++ b/book/src/install.md @@ -133,16 +133,12 @@ pacman -S mingw-w64-ucrt-x86_64-helix ``` ## Building from source - -According to the Unix Filesystem Hierarchy Standard the Helix source can be -installed in **/usr/local/src** or **/opt**, however we would prefer to install -Helix as a regular user without **sudo** access, so we can create a -**$HOME/src** directory. +Clone the Helix GitHub repository into a directory of your choice: +We will refer to this directory as `repository_directory`. ```sh -mkdir $HOME/src -git clone https://github.com/helix-editor/helix $HOME/src/helix -cd $HOME/src/helix +git clone https://github.com/helix-editor/helix +cd helix ``` Compile from source: @@ -153,17 +149,7 @@ 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++`. - -To test for an installed `gcc-c++` on your Unix distribution try: - -```sh -$ g++ --version - -g++ (Debian 10.2.1-6) 10.2.1 20210110 -Copyright (C) 2020 Free Software Foundation, Inc. -... -``` +a c++ compiler to be installed, for example `gcc-c++` or `clang`. > 💡 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: @@ -182,18 +168,18 @@ Copyright (C) 2020 Free Software Foundation, Inc. #### Linux and macOS -The **runtime** directory is in the Helix repository cloned root, so either +The **runtime** directory is in the root of the `repository_directory`, so either set the `HELIX_RUNTIME` environment variable to point to the runtime files and add it to your `~/.bashrc` or equivalent: ```sh -HELIX_RUNTIME=$HOME/src/helix/runtime +HELIX_RUNTIME=repository_directory/helix/runtime ``` -Or, create a symlink from the Helix repository root runtime directory. +Or, create a symbolic link: ```sh -ln -s $HOME/src/helix/runtime ~/.config/helix/runtime +ln -s repository_directory/helix/runtime ~/.config/helix/runtime ``` #### Windows From 92fa0c98736c9bd47075fc938f8f1fffffd15598 Mon Sep 17 00:00:00 2001 From: kazimir-malevich Date: Wed, 19 Apr 2023 12:09:27 +0100 Subject: [PATCH 5/9] attempted to synthesise comments given --- book/src/install.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/book/src/install.md b/book/src/install.md index 6d83306bb56a..99ca5ba38416 100644 --- a/book/src/install.md +++ b/book/src/install.md @@ -133,8 +133,10 @@ pacman -S mingw-w64-ucrt-x86_64-helix ``` ## Building from source -Clone the Helix GitHub repository into a directory of your choice: -We will refer to this directory as `repository_directory`. + +Clone the Helix GitHub repository into a directory of your choice. The +examples in this documentation assume installation into either `~/src/` on +Linux and macOS, or `%userprofile%\src\helix\runtime` on Windows. ```sh git clone https://github.com/helix-editor/helix @@ -168,18 +170,18 @@ a c++ compiler to be installed, for example `gcc-c++` or `clang`. #### Linux and macOS -The **runtime** directory is in the root of the `repository_directory`, so either -set the `HELIX_RUNTIME` environment variable to point to the runtime files and -add it to your `~/.bashrc` or equivalent: +The **runtime** directory is one below the Helix source, so either set a +`HELIX_RUNTIME` environment variable to point to that directory and add it to +your `~/.bashrc` or equivalent: ```sh -HELIX_RUNTIME=repository_directory/helix/runtime +HELIX_RUNTIME=/home/user-name/src/helix/runtime ``` Or, create a symbolic link: ```sh -ln -s repository_directory/helix/runtime ~/.config/helix/runtime +ln -s /home/user-name/src/helix/runtime ~/.config/helix/runtime ``` #### Windows From c58251e7e7dc87328736fff927d1d2f4db05b910 Mon Sep 17 00:00:00 2001 From: kazimir-malevich Date: Wed, 10 May 2023 04:57:48 +0100 Subject: [PATCH 6/9] capitalisation of second header --- book/src/install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/src/install.md b/book/src/install.md index 5f03a907907c..e10025802985 100644 --- a/book/src/install.md +++ b/book/src/install.md @@ -152,7 +152,7 @@ For 64-bit Windows 8.1 or above: pacman -S mingw-w64-ucrt-x86_64-helix ``` -## building from source +## Building from source Requirements: From 8a968ed5beaf3bf351bb39a02521bebf802e9e57 Mon Sep 17 00:00:00 2001 From: kazimir-malevich Date: Thu, 11 May 2023 14:10:33 +0100 Subject: [PATCH 7/9] required changes hopefully made --- book/src/install.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/book/src/install.md b/book/src/install.md index e10025802985..d41aa77ae410 100644 --- a/book/src/install.md +++ b/book/src/install.md @@ -182,7 +182,9 @@ cd helix ```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. + +This command will create the `hx` executable and construct the tree-sitter grammars in the +local `runtime` folder. > 💡 Tree-sitter grammars can be fetched and compiled if not pre-packaged. Fetch > grammars with `hx --grammar fetch` and compile them with @@ -199,13 +201,13 @@ The **runtime** directory is one below the Helix source, so either set a your `~/.bashrc` or equivalent: ```sh -helix_runtime=~/src/helix/runtime +HELIX_RUNTIME=~/src/helix/runtime ``` Or, create a symbolic link: ```sh -ln -s ~/src/helix/runtime ~/.config/helix/runtime +ln -s ~/src/helix/runtime ~/.config/helix/runtime ``` #### Windows From fe6fa33d00c296dea1c70c1eb186e0d041be03fe Mon Sep 17 00:00:00 2001 From: kazimir-malevich Date: Sat, 13 May 2023 11:57:58 +0100 Subject: [PATCH 8/9] we should have a match now --- book/src/install.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/book/src/install.md b/book/src/install.md index d41aa77ae410..33e4b7d933b2 100644 --- a/book/src/install.md +++ b/book/src/install.md @@ -183,8 +183,8 @@ cd helix cargo install --path helix-term --locked ``` -This command will create the `hx` executable and construct the tree-sitter grammars in the -local `runtime` folder. +This command will create the `hx` executable and construct the tree-sitter +grammars in the local `runtime` folder. > 💡 Tree-sitter grammars can be fetched and compiled if not pre-packaged. Fetch > grammars with `hx --grammar fetch` and compile them with From f4b3bba9e359ee6384fbbd1c190ae7edd34a844a Mon Sep 17 00:00:00 2001 From: kazimir-malevich Date: Mon, 5 Jun 2023 08:48:46 +0100 Subject: [PATCH 9/9] Linux windows dir match --- book/src/install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/src/install.md b/book/src/install.md index 33e4b7d933b2..f788114410a0 100644 --- a/book/src/install.md +++ b/book/src/install.md @@ -158,7 +158,7 @@ Requirements: Clone the Helix GitHub repository into a directory of your choice. The examples in this documentation assume installation into either `~/src/` on -Linux and macOS, or `%userprofile%\src\helix\runtime` on Windows. +Linux and macOS, or `%userprofile%\src\` on Windows. - The [Rust toolchain](https://www.rust-lang.org/tools/install) - The [Git version control system](https://git-scm.com/)