Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

programs.helix.enable

Whether to enable helix text editor.

Type: boolean

Default:

false

Example:

true

Declared by:

programs.helix.package

The helix package to use.

Type: null or package

Default:

pkgs.helix

Example:

pkgs.evil-helix

Declared by:

programs.helix.defaultEditor

Whether to configure hx as the default editor using the EDITOR and VISUAL environment variables.

Type: boolean

Default:

false

Declared by:

programs.helix.extraConfig

Extra lines to be appended to the config file. Use this if you would like to maintain order for helix settings (eg. for minor modes)

Type: strings concatenated with “\n”

Default:

""

Example:

[keys.normal.g] # Reverse Alphabetical Order
G = "goto_file_end"
g = "goto_file_start"

Declared by:

programs.helix.extraPackages

Extra packages available to hx.

Type: list of package

Default:

[ ]

Example:

[ pkgs.marksman ]

Declared by:

programs.helix.ignores

List of paths that should be globally ignored for file picker. Supports the usual ignore and negative ignore (unignore) rules used in .gitignore files.

Type: list of string

Default:

[ ]

Example:

[
  ".build/"
  "!.gitignore"
]

Declared by:

programs.helix.languages

Language specific configuration at $XDG_CONFIG_HOME/helix/languages.toml.

See https://docs.helix-editor.com/languages.html for more information.

Type: (TOML value) or (list of (TOML value)) convertible to it

Default:

{ }

Example:

{
  language-server.typescript-language-server = with pkgs.nodePackages; {
    command = "${typescript-language-server}/bin/typescript-language-server";
    args = [ "--stdio" "--tsserver-path=${typescript}/lib/node_modules/typescript/lib" ];
  };

  language = [{
    name = "rust";
    auto-format = false;
  }];
}

Declared by:

programs.helix.settings

Configuration written to $XDG_CONFIG_HOME/helix/config.toml.

See https://docs.helix-editor.com/configuration.html for the full list of options.

Type: TOML value

Default:

{ }

Example:

{
  editor = {
    line-number = "relative";
    lsp = {
      display-messages = true;
    };
  };
  keys = {
    normal = {
      esc = [
        "collapse_selection"
        "keep_primary_selection"
      ];
      space = {
        q = ":q";
        space = "file_picker";
        w = ":w";
      };
    };
  };
  theme = "base16";
}

Declared by:

programs.helix.themes

Each theme is written to $XDG_CONFIG_HOME/helix/themes/theme-name.toml. Where the name of each attribute is the theme-name (in the example “base16”).

See https://docs.helix-editor.com/themes.html for the full list of options.

Type: attribute set of (TOML value or absolute path or strings concatenated with “\n”)

Default:

{ }

Example:

{
  base16 = let
    transparent = "none";
    gray = "#665c54";
    dark-gray = "#3c3836";
    white = "#fbf1c7";
    black = "#282828";
    red = "#fb4934";
    green = "#b8bb26";
    yellow = "#fabd2f";
    orange = "#fe8019";
    blue = "#83a598";
    magenta = "#d3869b";
    cyan = "#8ec07c";
  in {
    "ui.menu" = transparent;
    "ui.menu.selected" = { modifiers = [ "reversed" ]; };
    "ui.linenr" = { fg = gray; bg = dark-gray; };
    "ui.popup" = { modifiers = [ "reversed" ]; };
    "ui.linenr.selected" = { fg = white; bg = black; modifiers = [ "bold" ]; };
    "ui.selection" = { fg = black; bg = blue; };
    "ui.selection.primary" = { modifiers = [ "reversed" ]; };
    "comment" = { fg = gray; };
    "ui.statusline" = { fg = white; bg = dark-gray; };
    "ui.statusline.inactive" = { fg = dark-gray; bg = white; };
    "ui.help" = { fg = dark-gray; bg = white; };
    "ui.cursor" = { modifiers = [ "reversed" ]; };
    "variable" = red;
    "variable.builtin" = orange;
    "constant.numeric" = orange;
    "constant" = orange;
    "attributes" = yellow;
    "type" = yellow;
    "ui.cursor.match" = { fg = yellow; modifiers = [ "underlined" ]; };
    "string" = green;
    "variable.other.member" = red;
    "constant.character.escape" = cyan;
    "function" = blue;
    "constructor" = blue;
    "special" = blue;
    "keyword" = magenta;
    "label" = magenta;
    "namespace" = blue;
    "diff.plus" = green;
    "diff.delta" = yellow;
    "diff.minus" = red;
    "diagnostic" = { modifiers = [ "underlined" ]; };
    "ui.gutter" = { bg = black; };
    "info" = blue;
    "hint" = dark-gray;
    "debug" = dark-gray;
    "warning" = yellow;
    "error" = red;
  };
}

Declared by: