feat(home/helix): reload config when changed

This commit is contained in:
Gabriel Fontes
2024-12-19 13:54:22 -03:00
parent fc184677e1
commit 051d0baf03
+10 -5
View File
@@ -1,4 +1,4 @@
{config, ...}: let
{config, pkgs, ...}: let
inherit (config) colorscheme;
hash = builtins.hashString "md5" (builtins.toJSON colorscheme.colors);
in {
@@ -18,10 +18,12 @@ in {
};
};
languages = {
language = [{
name = "nix";
language-servers = ["nixd" "nil"];
}];
language = [
{
name = "nix";
language-servers = ["nixd" "nil"];
}
];
language-server.nixd = {
command = "nixd";
config.formatting.command = "alejandra";
@@ -29,4 +31,7 @@ in {
};
themes."nix-${hash}" = import ./theme.nix {inherit colorscheme;};
};
xdg.configFile."helix/config.toml".onChange = ''
${pkgs.procps}/bin/pkill -u $USER -USR1 hx || true
'';
}