full helix config

This commit is contained in:
Semere Meharena Mebrahtom 2026-07-19 14:15:56 +02:00
parent 7f81aef8f4
commit 0077d0a5ee
Signed by: semere
GPG key ID: 7FC937214DF30488
5 changed files with 175 additions and 18 deletions

View file

@ -15,6 +15,7 @@
dev.enable = true; dev.enable = true;
shell.enable = true; shell.enable = true;
zsh.enable = true; zsh.enable = true;
helix.enable = true;
}; };
}; };
} }

View file

@ -20,6 +20,7 @@ in
ty ty
nil nil
nixd nixd
nixfmt
]; ];
}; };
} }

View file

@ -55,17 +55,7 @@ in
pinentry.package = pkgs.pinentry-qt; pinentry.package = pkgs.pinentry-qt;
}; };
programs.helix = {
enable = true;
defaultEditor = true;
settings = {
theme = "ayu_dark";
editor = {
line-number = "relative";
lsp.display-messages = true;
};
};
};
}; };
}; };
} }

152
modules/shell/helix.nix Normal file
View file

@ -0,0 +1,152 @@
{
config,
lib,
pkgs,
userVars,
...
}:
let
cfg = config.dotfiles.helix;
in
{
options.dotfiles.helix = {
enable = lib.mkEnableOption "Fully configured Helix editor";
};
config = lib.mkIf cfg.enable {
home-manager.users."${userVars.username}" = {
programs.helix = {
enable = true;
defaultEditor = true;
settings = {
theme = "ayu_dark";
editor = {
line-number = "relative";
mouse = false;
color-modes = true;
auto-format = true;
completion-timeout = 5;
completion-replace = true;
preview-completion-insert = true;
scrolloff = 8;
cursorline = true;
auto-info = true;
rulers = [ 80 ];
bufferline = "multiple";
shell = [ "zsh" "-c" ];
jump-label-alphabet = "asdfghjklqwertyuiopzxcvbnm";
cursor-shape = {
insert = "bar";
normal = "block";
select = "underline";
};
inline-diagnostics = {
cursor-line = "warning";
other-lines = "disable";
};
file-picker = {
hidden = false;
git-ignore = true;
git-global = true;
};
statusline = {
left = [
"mode"
"file-base-name"
"version-control"
];
center = [ ];
right = [
"diagnostics"
"selections"
"position"
"file-encoding"
"file-type"
];
separator = "";
};
lsp = {
display-messages = true;
display-inlay-hints = true;
};
indent-guides = {
render = true;
character = "";
skip-levels = 1;
};
soft-wrap = {
enable = true;
};
smart-tab = {
enable = true;
supersede-menu = true;
};
};
};
languages = {
language = [
{
name = "python";
language-servers = [
"ty"
"ruff"
];
formatter = {
command = "ruff";
args = [
"format"
"-"
];
};
auto-format = true;
}
{
name = "c";
language-servers = [ "clangd" ];
formatter = {
command = "clang-format";
args = [ "--style=file" ];
};
auto-format = true;
}
{
name = "nix";
language-servers = [ "nixd" ];
formatter = {
command = "nixfmt";
};
auto-format = true;
}
];
language-server = {
nixd = {
command = "nixd";
};
ruff = {
command = "ruff";
};
ty = {
command = "ty";
args = [ "server" ];
};
clangd = {
command = "clangd";
};
};
};
};
};
};
}

View file

@ -1,4 +1,10 @@
{ config, lib, pkgs, userVars, ... }: {
config,
lib,
pkgs,
userVars,
...
}:
let let
cfg = config.dotfiles.zsh; cfg = config.dotfiles.zsh;
@ -139,17 +145,24 @@ in
python = { python = {
style = "bold yellow"; style = "bold yellow";
format = "[$symbol$version( \($virtualenv\))]($style) "; format = "[$symbol( \($virtualenv\))]($style) ";
symbol = "🐍 "; symbol = " ";
detect_extensions = [ "py" ]; detect_extensions = [ "py" ];
detect_files = [ "pyproject.toml" "requirements.txt" "uv.lock" ]; detect_files = [
"pyproject.toml"
"requirements.txt"
"uv.lock"
];
}; };
c = { c = {
style = "bold dimmed white"; style = "bold dimmed white";
format = "[$symbol($version(-$name))]($style) "; format = "[$symbol($version(-$name))]($style) ";
symbol = " "; symbol = " ";
detect_extensions = [ "c" "h" ]; detect_extensions = [
"c"
"h"
];
}; };
rust = { rust = {