Nixifying helix config

This commit is contained in:
Lyes Saadi 2025-08-04 18:02:25 +01:00
parent e43362f69a
commit 8a7fcff10d
Signed by: lyes
GPG key ID: 55A1D803917CF39A
4 changed files with 84 additions and 9 deletions

View file

@ -8,6 +8,7 @@
home-manager.useUserPackages = true;
home-manager.useGlobalPkgs = true;
home-manager.backupFileExtension = "backup";
home-manager.users.lyes = { ... }: {
imports =
[

View file

@ -4,5 +4,6 @@
imports =
[
./emacs.nix
./helix.nix
];
}

View file

@ -0,0 +1,73 @@
{ ... }:
{
programs.helix = {
enable = true;
defaultEditor = true;
settings = {
theme = "gruvbox_dark_hard";
editor = {
rulers = [ 80 ];
cursor-shape = {
insert = "bar";
normal = "block";
select = "underline";
};
};
};
languages = {
language = [
{
name = "rpm-spec";
scope = "source.bash";
file-types = [ "spec" ];
comment-token = "#";
indent = { tab-width = 4; unit = " "; };
grammar = "bash";
injection-regex = "%changelog";
roots = [];
}
# {
# name = "bash";
# file-types = [
# "sh" "bash" "zsh"
# ".bash_login" ".bash_logout" ".bash_profile"
# ".bashrc" ".profile" ".zshenv" "zshenv" ".zlogin"
# "zlogin" ".zlogout" "zlogout" ".zprofile" "zprofile"
# ".zshrc" "zshrc" ".zimrc"
# "APKBUILD" "PKGBUILD" "eclass" "ebuild" "bazelrc"
# ".bash_aliases" "Renviron" ".Renviron"
# "spec"
# ];
# indent = { tab-width = 4; unit = " "; };
# }
{
name = "c";
indent = { tab-width = 4; unit = " "; };
}
{
name = "latex";
soft-wrap.enable = true;
indent = { tab-width = 4; unit = " "; };
}
{
name = "lalrpop";
scope = "source.rs";
file-types = [ "lalrpop" ];
comment-token = "//";
indent = { tab-width = 4; unit = " "; };
grammar = "rust";
roots = [];
}
];
};
};
}