Helix

From NixOS Wiki
Revision as of 22:19, 8 February 2024 by imported>Mbwk (Initial article on Helix)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Helix is a modal text-editor inspired by Neovim and Kakoune, written in Rust.

Installation

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

environment.systemPackages = [ pkgs.helix ];

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 = "${pkgs.nixfmt}/bin/nixfmt";
  }];
  themes = {
    autumn_night_transparent = {
      "inherits" = "autumn_night";
      "ui.background" = { };
    };
  };
};