dotfiles/nixos/helix/home.nix
Cyryl Płotnicki d0ee7b139c
Some checks failed
use nix / build (push) Has been cancelled
make sure zsh editor config can be materialised on mac
2024-10-02 15:42:46 +01:00

60 lines
1.3 KiB
Nix

{
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 = helix;
VISUAL = 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;
};
};
};
}