nix-config/modules/home-manager/helix.nix
2026-02-16 15:17:48 +01:00

77 lines
1.4 KiB
Nix

{ pkgs, ... }:
{
programs.helix = {
enable = true;
defaultEditor = true;
extraPackages = with pkgs; [
marksman
nixd
nixfmt
];
settings = {
editor = {
line-number = "relative";
cursorline = true;
color-modes = true;
mouse = true;
end-of-line-diagnostics = "hint";
inline-diagnostics.cursor-line = "warning";
cursor-shape = {
insert = "bar";
normal = "block";
select = "underline";
};
soft-wrap.enable = true;
statusline = {
left = [
"mode"
"spinner"
"version-control"
"read-only-indicator"
"file-modification-indicator"
];
center = [ "file-name" ];
right = [
"diagnostics"
"selections"
"register"
"position"
"position-percentage"
"file-encoding"
"file-type"
];
};
};
keys = {
normal = {
X = [
"extend_line_up"
"extend_to_line_bounds"
];
};
};
};
languages.language = [
{
name = "nix";
formatter.command = "nixfmt";
auto-format = true;
}
{
name = "typst";
formatter.command = "typstyle";
auto-format = true;
}
];
};
}