Helix

From Gentoo Wiki
Jump to:navigation Jump to:search

Helix is a 'Post-Modern' modal text editor based on Neovim and Kakoune that is written in Rust. Helix comes with a built-in language server, multiple selections, and smart syntax highlighting.

Installation

USE flags

USE flags for app-editors/helix A post-modern text editor

+grammar Build and install grammar language files
debug Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
Data provided by the Gentoo Package Database · Last update: 2026年03月14日 18:46 More information about USE flags

Emerge

root #emerge --ask app-editors/helix

Configuration

Helix uses the TOML format for configuration, making the configuration much easier and cleaner than comparable text editors. The configuration is stored at ~/.config/helix/config.toml.

The runtime directory is installed into /usr/share/helix/runtime, and needs to be linked to the configuration of the user accounts running helix:

user $ln -s /usr/share/helix/runtime ~/.config/helix/runtime

Usage

Helix can be started with hx:

user $hx
Tip
Use hx --tutor for an interactive introduction to Helix.

Themes

Helix already has a large amount of themes built-in. Setting the theme can be done during a session with :theme catppucin_latte or inside the configuration file:

FILE ~/.config/helix/config.toml
theme="catppuccin_frappe"

Language support

Helix support languages through LSP with several LSP already pre-configured.

The server for the corresponding language can be installed by placing the executable in PATH. For example, marksman for markdown will allow the user to jump between headings. This package is not available yet on Gentoo but a binary can be found on Github.

Configuration can be done in languages.toml. For example, setting texlab with tectonic (both not yet packaged by Gentoo but easily installed):

FILE ~/.config/helix/languages.toml
[language-server]
texlab={command="texlab",config={texlab.build={executable="tectonic",args=["-X","compile","%f","--synctex","--keep-logs","--keep-intermediates"]}}},onSave=true}}

}

Using a LSP in LaTeX allows for example to have a completion upon the bibliography with the \cite{} command.

See Also