nix-configs/modules/helix.nix
2023-10-28 22:25:06 +02:00

46 lines
1.2 KiB
Nix

{ config, lib, ... }:
let cfg = config.jade.helix;
in with lib; {
options.jade.helix = {
enable = mkEnableOption "Enable helix";
};
config = mkIf cfg.enable {
home-manager.users.jade = { pkgs, ... }: {
home = {
sessionVariables.EDITOR = "hx";
packages = [
pkgs.nil
pkgs.haskell-language-server
pkgs.nodePackages_latest.vscode-html-languageserver-bin
pkgs.nodePackages_latest.vscode-json-languageserver-bin
pkgs.nodePackages_latest.vscode-css-languageserver-bin
pkgs.nodePackages_latest.bash-language-server
];
};
programs.helix = {
enable = true;
settings = {
theme = "gruvbox";
editor = {
line-number = "relative";
lsp.display-messages = true;
};
keys.normal = {
space."=" = ":fmt";
};
};
languages = {
"php" = {
name = "php";
file-types = [ "php" ];
language-server = {
command = "psalm";
args = ["--language-server"];
};
};
};
};
};
};
}