nix-stuff/roles/common/programs/helix.nix

38 lines
949 B
Nix

{pkgs, ...}: {
home-manager.users.toast = {
programs.helix = {
enable = true;
defaultEditor = true;
extraPackages = with pkgs; [
nixpkgs-fmt
nil
];
settings = {
theme = "catppuccin_mocha";
editor = {
mouse = true;
cursorline = true;
color-modes = true;
bufferline = "multiple";
statusline.mode = {
normal = "Normal";
insert = "Insert";
select = "Select";
};
indent-guides.render = true;
};
};
};
# The builtin languages options have issues
# https://github.com/nix-community/home-manager/issues/3299
xdg.configFile."helixLanguages" = {
target = "helix/languages.toml";
text = ''
[language-server.nil]
config.nil.formatting.command = [ "nixpkgs-fmt" ]
[[language]]
name = "nix"
'';
};
};
}