dotfiles/nixos/helix/home.nix

61 lines
1.3 KiB
Nix
Raw Normal View History

2024-04-21 14:15:40 +01:00
{
lib,
inputs,
system,
...
}: let
alejandra = lib.getExe inputs.alejandra.packages.${system}.default;
nil = lib.getExe inputs.nil.packages.${system}.default;
helixPackage = inputs.helix.packages.${system}.default;
helix = lib.getExe helixPackage;
in {
home.sessionVariables = {
EDITOR = lib.mkForce helix;
VISUAL = lib.mkForce helix;
};
programs.zsh.sessionVariables = {
EDITOR = lib.mkForce helix;
VISUAL = lib.mkForce helix;
};
systemd.user.sessionVariables = {
EDITOR = lib.mkForce helix;
VISUAL = lib.mkForce helix;
};
programs.helix = {
enable = true;
package = helixPackage;
languages = {
language = [
{
name = "nix";
auto-format = true;
language-servers = ["nil"];
formatter = {
command = alejandra;
args = ["-q"];
};
}
];
language-server.nil = {
command = nil;
config.nil.nix = {
maxMemoryMB = 8192;
flake.autoEvalInputs = true;
};
};
};
settings = {
theme = "solarized_dark";
editor = {
auto-save = true;
auto-pairs = false;
file-picker.hidden = false;
lsp.display-messages = true;
line-number = "relative";
soft-wrap.enable = true;
};
};
};
}