xin/configs/helix.nix

47 lines
910 B
Nix
Raw Normal View History

2023-07-11 09:12:50 -06:00
{
pkgs,
linkFarm,
...
}: let
tomlFmt = pkgs.formats.toml {};
helixBin = "${pkgs.helix}/bin/hx";
helixConfig = tomlFmt.generate "config.toml" {
theme = "acme-nobg";
editor = {
mouse = false;
cursor-shape = {
insert = "bar";
normal = "block";
select = "underline";
};
2023-07-11 09:12:50 -06:00
lsp = {auto-signature-help = false;};
};
};
helixTheme = tomlFmt.generate "acme-nobg.toml" {
inherits = "acme";
"ui.background" = "default";
"ui.linenr" = "default";
"ui.linenr.selected" = "#DEDEFF";
};
xdgDir = linkFarm "helix-config" [
2023-05-03 19:23:11 -06:00
{
name = "helix/config.toml";
path = helixConfig;
}
{
name = "helix/themes/acme-nobg.toml";
path = helixTheme;
}
];
2023-07-11 09:12:50 -06:00
in
pkgs.writeScriptBin "hx" ''
# Conf: ${helixConfig}
# Theme: ${helixTheme}
2023-07-11 09:12:50 -06:00
env XDG_CONFIG_HOME="${xdgDir}" ${helixBin} "$@"
''