Jump to content

Helix

From Official NixOS Wiki
Revision as of 12:31, 3 September 2026 by Onny (talk | contribs) (Cleanup page, streamline structure)

Helix is a modal text-editor inspired by Neovim and Kakoune, written in Rust. Compared to neovim, it is preconfigured with the functions that most people need (for example tree-sitter for syntax highlighting). It uses (neo-)vim motions keybindings, but it uses the object-verb approach (visually highlighting text and then executing a function on it). It is intended for people who like to use a modal text editor but don't want to spend a lot of time configuring it.

Seup

Helix can be installed system-wide on NixOS with the helix package:

environment.systemPackages = [ pkgs.helix ];

Depending on the programming languages it is helpful to install additional packages from nixpkgs. To show what packages are needed, it is helpful to check hx --health.

With Home Manager

Home Manager provides a module for configuring helix.

programs.helix = {
  enable = true;
  settings = {
    theme = "autumn_night_transparent";
    editor.cursor-shape = {
      normal = "block";
      insert = "bar";
      select = "underline";
    };
  };
  languages.language = [{
    name = "nix";
    auto-format = true;
    formatter.command = lib.getExe pkgs.nixfmt-rfc-style;
  }];
  themes = {
    autumn_night_transparent = {
      "inherits" = "autumn_night";
      "ui.background" = { };
    };
  };
};

The full configuration options are described on the Helix documentation. For programming languages (LSP, formatter, ..) see the Helix wiki.

Tips and tricks

Plugins

There is an open and actively worked on PR to add plugins, which can be tested by using the steelix package from nixpkgs-unstable.