mirror of https://github.com/helix-editor/helix
Rewrite and refactor all documentation
parent
b6331394a3
commit
421b5ebace
@ -1,5 +1,6 @@
|
|||||||
# Commands
|
# Commands
|
||||||
|
|
||||||
Command mode can be activated by pressing `:`, similar to Vim. Built-in commands:
|
Command mode, similar to Vim, can be activated by pressing `:`. The built-in
|
||||||
|
commands are:
|
||||||
|
|
||||||
{{#include ./generated/typable-cmd.md}}
|
{{#include ./generated/typable-cmd.md}}
|
||||||
|
@ -1,171 +1,222 @@
|
|||||||
# Installation
|
# Installing Helix
|
||||||
|
|
||||||
We provide pre-built binaries on the [GitHub Releases page](https://github.com/helix-editor/helix/releases).
|
<!--toc:start-->
|
||||||
|
|
||||||
[![Packaging status](https://repology.org/badge/vertical-allrepos/helix.svg)](https://repology.org/project/helix/versions)
|
- [Installing Helix](#installing-helix)
|
||||||
|
- [Using the Pre-built Binaries](#using-the-pre-built-binaries)
|
||||||
## OSX
|
- [Installing Helix on Linux through the Official Package Manager](#installing-helix-on-linux-through-the-official-package-manager)
|
||||||
|
- [Installing Helix on Linux via Third-Party Repositories](#installing-helix-on-linux-via-third-party-repositories)
|
||||||
|
- [Installing Helix on macOS via Homebrew](#installing-helix-on-macos-via-homebrew)
|
||||||
|
- [Installing Helix on Windows](#installing-helix-on-windows)
|
||||||
|
- [Building from Source](#building-from-source)
|
||||||
|
- [Validating the Installation](#validating-the-installation)
|
||||||
|
<!--toc:end-->
|
||||||
|
|
||||||
Helix is available in homebrew-core:
|
To install Helix, follow the instructions specific to your operating system.
|
||||||
|
Additionally:
|
||||||
|
|
||||||
```
|
- To get the latest pre-release version of Helix, you will need to
|
||||||
brew install helix
|
[build from source](#building-from-source).
|
||||||
```
|
|
||||||
|
|
||||||
## Linux
|
- To take full advantage of Helix, install the language servers for your
|
||||||
|
preferred programming languages. Refer to the
|
||||||
|
[Helix Wiki](https://github.com/helix-editor/helix/wiki/How-to-install-the-default-language-servers)
|
||||||
|
for detailed instructions.
|
||||||
|
|
||||||
### NixOS
|
## Using the Pre-built Binaries
|
||||||
|
|
||||||
A [flake](https://nixos.wiki/wiki/Flakes) containing the package is available in
|
Download pre-built binaries from the
|
||||||
the project root. The flake can also be used to spin up a reproducible development
|
[GitHub Releases page](https://github.com/helix-editor/helix/releases). You will
|
||||||
shell for working on Helix with `nix develop`.
|
need to add the binary to your system's `$PATH` to access it from the command
|
||||||
|
line.
|
||||||
|
|
||||||
Flake outputs are cached for each push to master using
|
## Installing Helix on Linux through the Official Package Manager
|
||||||
[Cachix](https://www.cachix.org/). The flake is configured to
|
|
||||||
automatically make use of this cache assuming the user accepts
|
|
||||||
the new settings on first use.
|
|
||||||
|
|
||||||
If you are using a version of Nix without flakes enabled you can
|
If your Linux distribution has Helix available through its official package
|
||||||
[install Cachix cli](https://docs.cachix.org/installation); `cachix use helix` will
|
manager, install it through that. The following list shows availability
|
||||||
configure Nix to use cached outputs when possible.
|
throughout the Linux ecosystem:
|
||||||
|
|
||||||
### Arch Linux
|
[![Packaging status](https://repology.org/badge/vertical-allrepos/helix.svg)](https://repology.org/project/helix/versions)
|
||||||
|
|
||||||
Releases are available in the `community` repository.
|
## Installing Helix on Linux via Third-Party Repositories
|
||||||
|
|
||||||
A [helix-git](https://aur.archlinux.org/packages/helix-git/) package is also available on the AUR, which builds the master branch.
|
If Helix is not available through your distribution's official repository, use a
|
||||||
|
third-party repository.
|
||||||
|
|
||||||
### Fedora Linux
|
- Ubuntu
|
||||||
|
|
||||||
You can install the COPR package for Helix via
|
Helix is available for 20.04 LTS (Focal Fossa) and 22.04 Ubuntu 22.04 LTS (Jammy
|
||||||
|
Jellyfish) via
|
||||||
|
[Maveonair's PPA](https://launchpad.net/~maveonair/+archive/ubuntu/helix-editor):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo add-apt-repository ppa:maveonair/helix-editor
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install helix
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- Fedora/RHEL Linux
|
||||||
|
|
||||||
|
Helix is available via `copr`:
|
||||||
|
|
||||||
|
```sh
|
||||||
sudo dnf copr enable varlad/helix
|
sudo dnf copr enable varlad/helix
|
||||||
sudo dnf install helix
|
sudo dnf install helix
|
||||||
```
|
```
|
||||||
|
|
||||||
### Void Linux
|
- Arch Linux Community
|
||||||
|
|
||||||
```
|
Releases are available in the community repository. Additionally, a
|
||||||
sudo xbps-install helix
|
[helix-git](https://aur.archlinux.org/packages/helix-git/) package is available
|
||||||
|
in the AUR, which builds the master branch.
|
||||||
|
|
||||||
|
- NixOS
|
||||||
|
|
||||||
|
Helix is available as a [flake](https://nixos.wiki/wiki/Flakes) in the project
|
||||||
|
root. Use `nix develop` to spin up a reproducible development shell. Outputs are
|
||||||
|
cached for each push to master using [Cachix](https://www.cachix.org/). The
|
||||||
|
flake is configured to automatically make use of this cache assuming the user
|
||||||
|
accepts the new settings on first use.
|
||||||
|
|
||||||
|
If you are using a version of Nix without flakes enabled,
|
||||||
|
[install Cachix CLI](https://docs.cachix.org/installation) and use
|
||||||
|
`cachix use helix` to configure Nix to use cached outputs when possible.
|
||||||
|
|
||||||
|
## Installing Helix on macOS via Homebrew
|
||||||
|
|
||||||
|
Helix is available in Homebrew Core:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
brew install helix
|
||||||
```
|
```
|
||||||
|
|
||||||
## Windows
|
## Installing Helix on Windows
|
||||||
|
|
||||||
Helix can be installed using [Scoop](https://scoop.sh/), [Chocolatey](https://chocolatey.org/)
|
Install on Windows using [Scoop](https://scoop.sh/),
|
||||||
or [MSYS2](https://msys2.org/).
|
[Chocolatey](https://chocolatey.org/) or [MSYS2](https://msys2.org/).
|
||||||
|
|
||||||
**Scoop:**
|
**Scoop:**
|
||||||
|
|
||||||
```
|
```sh
|
||||||
scoop install helix
|
scoop install helix
|
||||||
```
|
```
|
||||||
|
|
||||||
**Chocolatey:**
|
**Chocolatey:**
|
||||||
|
|
||||||
```
|
```sh
|
||||||
choco install helix
|
choco install helix
|
||||||
```
|
```
|
||||||
|
|
||||||
**MSYS2:**
|
**MSYS2:**
|
||||||
|
|
||||||
Choose the proper command for your system from below:
|
For 64-bit Windows 8.1 or above:
|
||||||
|
|
||||||
- For 32 bit Windows 7 or above:
|
|
||||||
|
|
||||||
```
|
```sh
|
||||||
pacman -S mingw-w64-i686-helix
|
pacman -S mingw-w64-ucrt-x86_64-helix
|
||||||
```
|
```
|
||||||
|
|
||||||
- For 64 bit Windows 7 or above:
|
## Building from Source
|
||||||
|
|
||||||
```
|
1. Clone the repository:
|
||||||
pacman -S mingw-w64-x86_64-helix
|
|
||||||
```
|
|
||||||
|
|
||||||
- For 64 bit Windows 8.1 or above:
|
|
||||||
|
|
||||||
```
|
```sh
|
||||||
pacman -S mingw-w64-ucrt-x86_64-helix
|
git clone https://github.com/helix-editor/helix
|
||||||
|
cd helix
|
||||||
```
|
```
|
||||||
|
|
||||||
## Build from source
|
2. Compile Helix:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
git clone https://github.com/helix-editor/helix
|
|
||||||
cd helix
|
|
||||||
cargo install --path helix-term --locked
|
cargo install --path helix-term --locked
|
||||||
```
|
```
|
||||||
|
|
||||||
This will install the `hx` binary to `$HOME/.cargo/bin` and build tree-sitter grammars in `./runtime/grammars`.
|
This command will create the `hx` executable and construct the tree-sitter
|
||||||
|
grammars in the `runtime` folder, or in the folder specified in `HELIX_RUNTIME`
|
||||||
|
(as described below).
|
||||||
|
|
||||||
Helix also needs its runtime files so make sure to copy/symlink the `runtime/` directory into the
|
3. Configure Helix's runtime files
|
||||||
config directory (for example `~/.config/helix/runtime` on Linux/macOS). This location can be overridden
|
|
||||||
via the `HELIX_RUNTIME` environment variable.
|
|
||||||
|
|
||||||
| OS | Command |
|
**IMPORTANT**: The runtime files must be accessible to the newly created binary.
|
||||||
| -------------------- | ------------------------------------------------ |
|
They are currently located in the source code `runtime` directory. To make them
|
||||||
| Windows (Cmd) | `xcopy /e /i runtime %AppData%\helix\runtime` |
|
accessible, you must follow the instructions for your operating system:
|
||||||
| Windows (PowerShell) | `xcopy /e /i runtime $Env:AppData\helix\runtime` |
|
|
||||||
| Linux / macOS | `ln -s $PWD/runtime ~/.config/helix/runtime` |
|
|
||||||
|
|
||||||
Starting with Windows Vista you can also create symbolic links on Windows. Note that this requires
|
> 💡 Tree-sitter grammars can be fetched and compiled if not pre-packaged. Fetch
|
||||||
elevated privileges - i.e. PowerShell or Cmd must be run as administrator.
|
> grammars with `hx --grammar fetch` (requires `git`) and compile them with
|
||||||
|
> `hx --grammar build` (requires a C++ compiler).
|
||||||
|
|
||||||
**PowerShell:**
|
- Linux and macOS
|
||||||
|
|
||||||
```powershell
|
Either,
|
||||||
New-Item -ItemType SymbolicLink -Target "runtime" -Path "$Env:AppData\helix\runtime"
|
|
||||||
```
|
|
||||||
|
|
||||||
**Cmd:**
|
1. Set the `HELIX_RUNTIME` environmental variable on your system to tell Helix
|
||||||
|
where to find the runtime files.
|
||||||
|
|
||||||
```cmd
|
Use the `HELIX_RUNTIME=/path/to/helix/runtime` format, for example:
|
||||||
cd %appdata%\helix
|
`HELIX_RUNTIME=/home/user-name/src/helix/runtime`. Add this variable to your
|
||||||
mklink /D runtime "<helix-repo>\runtime"
|
`~/.bashrc` file or equivalent to persist it.
|
||||||
```
|
|
||||||
|
|
||||||
The runtime location can be overridden via the `HELIX_RUNTIME` environment variable.
|
Or,
|
||||||
|
|
||||||
> NOTE: if `HELIX_RUNTIME` is set prior to calling `cargo install --path helix-term --locked`,
|
2. Create a symlink in `~/.config/helix/` that links to the source code
|
||||||
> tree-sitter grammars will be built in `$HELIX_RUNTIME/grammars`.
|
directory.
|
||||||
|
|
||||||
If you plan on keeping the repo locally, an alternative to copying/symlinking
|
`ln -s $PWD/runtime ~/.config/helix/runtime`
|
||||||
runtime files is to set `HELIX_RUNTIME=/path/to/helix/runtime`
|
|
||||||
(`HELIX_RUNTIME=$PWD/runtime` if you're in the helix repo directory).
|
|
||||||
|
|
||||||
To use Helix in desktop environments that supports [XDG desktop menu](https://specifications.freedesktop.org/menu-spec/menu-spec-latest.html), including Gnome and KDE, copy the provided `.desktop` file to the correct folder:
|
And optionally:
|
||||||
|
|
||||||
```bash
|
3. Configure the Desktop Shortcut
|
||||||
|
|
||||||
|
If your desktop environment supports the
|
||||||
|
[XDG desktop menu](https://specifications.freedesktop.org/menu-spec/menu-spec-latest.html),
|
||||||
|
you can configure Helix to show up in the application menu by copying the
|
||||||
|
provided `.desktop` and icon files to their correct folders:
|
||||||
|
|
||||||
|
```sh
|
||||||
cp contrib/Helix.desktop ~/.local/share/applications
|
cp contrib/Helix.desktop ~/.local/share/applications
|
||||||
|
cp contrib/helix.png ~/.local/share/icons
|
||||||
```
|
```
|
||||||
|
|
||||||
To use another terminal than the default, you will need to modify the `.desktop` file. For example, to use `kitty`:
|
To use another terminal than the system default, you can modify the `.desktop`
|
||||||
|
file. For example, to use `kitty`:
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
sed -i "s|Exec=hx %F|Exec=kitty hx %F|g" ~/.local/share/applications/Helix.desktop
|
sed -i "s|Exec=hx %F|Exec=kitty hx %F|g" ~/.local/share/applications/Helix.desktop
|
||||||
sed -i "s|Terminal=true|Terminal=false|g" ~/.local/share/applications/Helix.desktop
|
sed -i "s|Terminal=true|Terminal=false|g" ~/.local/share/applications/Helix.desktop
|
||||||
```
|
```
|
||||||
|
|
||||||
Please note: there is no icon for Helix yet, so the system default will be used.
|
- Windows
|
||||||
|
|
||||||
## Finishing up the installation
|
> TODO Add correct file paths after feedback
|
||||||
|
|
||||||
To make sure everything is set up as expected you should finally run the helix healthcheck via
|
Either,
|
||||||
|
|
||||||
```
|
1. Set the `HELIX_RUNTIME` environmental variable on your system to tell Helix
|
||||||
hx --health
|
where to find the runtime files.
|
||||||
```
|
|
||||||
|
Use the `???` format, for example: `???`. Add this variable to your `???`
|
||||||
|
file or equivalent to persist it.
|
||||||
|
|
||||||
For more information on the information displayed in the health check results refer to [Healthcheck](https://github.com/helix-editor/helix/wiki/Healthcheck).
|
Or,
|
||||||
|
|
||||||
### Building tree-sitter grammars
|
2. Create a symlink in `???` that links to the source code directory.
|
||||||
|
|
||||||
Tree-sitter grammars must be fetched and compiled if not pre-packaged.
|
| Method | Command |
|
||||||
Fetch grammars with `hx --grammar fetch` (requires `git`) and compile them
|
| ---------- | -------------------------------------------------------------------------------------- |
|
||||||
with `hx --grammar build` (requires a C++ compiler).
|
| PowerShell | `New-Item -ItemType SymbolicLink -Target "runtime" -Path "$Env:AppData\helix\runtime"` |
|
||||||
|
| Cmd | `cd %appdata%\helix` |
|
||||||
|
| | `mklink /D runtime "<helix-repo>\runtime"` |
|
||||||
|
|
||||||
### Installing language servers
|
> 💡 On Windows, creating a symbolic link may require running PowerShell or Cmd
|
||||||
|
> as an administrator.
|
||||||
|
|
||||||
|
## Validating the Installation
|
||||||
|
|
||||||
|
To make sure everything is set up as expected you should run the Helix health
|
||||||
|
check:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
hx --health
|
||||||
|
```
|
||||||
|
|
||||||
Language servers can optionally be installed if you want their features (auto-complete, diagnostics etc.).
|
For more information on the health check results refer to
|
||||||
Follow the [instructions on the wiki page](https://github.com/helix-editor/helix/wiki/How-to-install-the-default-language-servers) to add your language servers of choice.
|
[Health check](https://github.com/helix-editor/helix/wiki/Healthcheck).
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
# Language Support
|
# Language Support
|
||||||
|
|
||||||
The following languages and Language Servers are supported. In order to use
|
The following languages and Language Servers are supported. To use Language
|
||||||
Language Server features, you must first [install][lsp-install-wiki] the
|
Server features, you must first [install][lsp-install-wiki] the appropriate
|
||||||
appropriate Language Server.
|
Language Server.
|
||||||
|
|
||||||
Check the language support in your installed helix version with `hx --health`.
|
You can check the language support in your installed Helix version with
|
||||||
|
`hx --health`.
|
||||||
|
|
||||||
Also see the [Language Configuration][lang-config] docs and the [Adding
|
Also see the [Language Configuration][lang-config] docs and the [Adding
|
||||||
Languages][adding-languages] guide for more language configuration information.
|
Languages][adding-languages] guide for more language configuration information.
|
||||||
|
|
||||||
{{#include ./generated/lang-support.md}}
|
{{#include ./generated/lang-support.md}}
|
||||||
|
|
||||||
[lsp-install-wiki]: https://github.com/helix-editor/helix/wiki/How-to-install-the-default-language-servers
|
[lsp-install-wiki]:
|
||||||
|
https://github.com/helix-editor/helix/wiki/How-to-install-the-default-language-servers
|
||||||
[lang-config]: ./languages.md
|
[lang-config]: ./languages.md
|
||||||
[adding-languages]: ./guides/adding_languages.md
|
[adding-languages]: ./guides/adding_languages.md
|
||||||
|
Loading…
Reference in New Issue