2024-02-18 12:23:08 -07:00
|
|
|
{ pkgs, linkFarm, ... }:
|
2023-09-12 08:44:05 -06:00
|
|
|
let
|
|
|
|
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";
|
|
|
|
};
|
2024-02-18 12:23:08 -07:00
|
|
|
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-07-11 09:12:50 -06:00
|
|
|
in
|
2023-09-12 08:44:05 -06:00
|
|
|
pkgs.writeScriptBin "hx" ''
|
|
|
|
# Conf: ${helixConfig}
|
|
|
|
# Theme: ${helixTheme}
|
2023-05-03 08:18:11 -06:00
|
|
|
|
2023-09-12 08:44:05 -06:00
|
|
|
env XDG_CONFIG_HOME="${xdgDir}" ${helixBin} "$@"
|
|
|
|
''
|