2023-05-03 08:18:11 -06:00
|
|
|
{ pkgs, linkFarm, ... }:
|
2023-05-02 12:27:54 -06:00
|
|
|
|
|
|
|
let
|
2023-05-02 19:40:03 -06:00
|
|
|
tomlFmt = pkgs.formats.toml { };
|
2023-05-03 12:40:26 -06:00
|
|
|
helixBin = "${pkgs.helix}/bin/hx";
|
2023-05-03 08:18:11 -06:00
|
|
|
|
|
|
|
helixConfig = tomlFmt.generate "config.toml" {
|
|
|
|
theme = "acme-nobg";
|
2023-05-02 18:21:09 -06:00
|
|
|
editor = {
|
|
|
|
mouse = false;
|
2023-05-02 19:40:03 -06:00
|
|
|
cursor-shape = {
|
|
|
|
insert = "bar";
|
|
|
|
normal = "block";
|
|
|
|
select = "underline";
|
|
|
|
};
|
|
|
|
lsp = { auto-signature-help = false; };
|
2023-05-02 18:21:09 -06:00
|
|
|
};
|
2023-05-02 12:27:54 -06:00
|
|
|
};
|
2023-05-03 08:18:11 -06:00
|
|
|
|
|
|
|
helixTheme = tomlFmt.generate "acme-nobg.toml" {
|
|
|
|
inherits = "acme";
|
|
|
|
|
|
|
|
"ui.background" = "default";
|
2023-05-03 08:47:18 -06:00
|
|
|
"ui.linenr" = "default";
|
2023-05-03 12:14:48 -06:00
|
|
|
"ui.linenr.selected" = "#DEDEFF";
|
2023-05-03 08:18:11 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
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-05-03 08:18:11 -06:00
|
|
|
];
|
2023-05-02 12:27:54 -06:00
|
|
|
in pkgs.writeScriptBin "hx" ''
|
2023-05-03 08:18:11 -06:00
|
|
|
# Conf: ${helixConfig}
|
|
|
|
# Theme: ${helixTheme}
|
|
|
|
|
|
|
|
env XDG_CONFIG_HOME="${xdgDir}" ${helixBin} "$@"
|
2023-05-02 12:27:54 -06:00
|
|
|
''
|