Files
dotfiles/home-modules/helix.nix
Lennart J. Kurzweg (Nx2) 44cedfa442 helix color ++
2024-05-14 18:51:14 +02:00

208 lines
5.4 KiB
Nix

{ config, pkgs, rice, ... }:
{
home = {
packages = with pkgs; [
helix
nixfmt # nix formater
nil # nix language server
python311Packages.python-lsp-server
];
sessionVariables = {
EDITOR = "hx";
VISUAL = "hx";
};
};
programs.helix = {
enable = true;
settings = {
# theme = "base16_terminal";
theme = "base16";
editor = {
cursor-shape = {
normal = "block";
insert = "bar";
select = "underline";
};
line-number = "relative";
color-modes = true;
bufferline = "always";
file-picker.hidden = false;
middle-click-paste = false;
cursorline = true;
indent-guides.render = true;
lsp.display-inlay-hints = true;
statusline.center = [ "position-percentage" ];
true-color = true;
whitespace.characters = {
newline = "";
tab = "";
};
};
};
languages.language = [{
name = "nix";
}];
themes = {
base16 = with rice.color; {
"attributes" = blue.bright;
"comment" = {
"fg" = white.dark;
"modifiers" = [ "italic" ];
};
"constant" = cyan.bright;
"constant.character.escape" = yellow.bright;
"constant.numeric" = blue.bright;
"constructor" = magenta.bright;
"debug" = yellow.dark;
"diagnostic.modifiers" = [ "underlined" ];
"diff.delta" = blue.bright;
"diff.minus" = red.bright;
"diff.plus" = green.bright;
"error" = red.bright;
"function" = cyan.bright;
"hint" = yellow.dark;
"info" = cyan.bright;
"keyword" = cyan.bright;
"label" = cyan.bright;
"namespace" = cyan.bright;
"operator" = magenta.bright;
"special" = cyan.bright;
"string" = green.bright;
"type" = green.bright;
"variable" = blue.bright;
"variableother.member" = green.base;
"warning" = blue.bright;
"markup.bold" = {
"fg" = green.bright;
"modifiers" = [ "bold" ];
};
"markup.heading" = cyan.bright;
"italic" = {
"fg" = cyan.bright;
"modifiers" = [ "italic" ];
};
"markup.linktext" = red.bright;
"markup.linkurl" = {
"fg" = blue.bright;
"modifiers" = [ "underlined" ];
};
"markup.list" = red.bright;
"markup.quote" = magenta.bright;
"markup.raw" = green.bright;
"markup.strikethrough" = {
"modifiers" = [ "crossed_out" ];
};
"diagnostic.hint" = {
"underline" = { style = "curl"; };
};
"diagnostic.info" = {
"underline" = { style = "curl"; };
};
"diagnostic.warning" = {
"underline" = { style = "curl"; };
};
"diagnostic.error" = {
"underline" = { style = "curl"; };
};
"ui.background" = { # general background of the editor window
"bg" = background;
};
"ui.bufferline" = { # the top line ("tab"-line)
"fg" = magenta.base;
"bg" = black.base;
};
"ui.bufferline.active" = { # the active "tab"
"fg" = background;
"bg" = magenta.base;
"modifiers" = [ "bold" ];
};
"ui.cursor" = { # the cursor in Normal mode
"fg" = white.base;
"modifiers" = [ "reversed" ];
};
"ui.cursorline.primary" = { # the line on which the cursor is on
"bg" = black.base;
};
"ui.cursor.match" = { # Matching bracket etc.
"bg" = green.dark;
"modifiers" = [ "reversed" ];
};
"ui.gutter" = {
"bg" = black.base;
};
"ui.help" = {
"fg" = cyan.base;
"bg" = black.base;
};
"ui.linenr" = {
"fg" = white.dark;
"bg" = black.base;
};
"ui.linenr.selected" = {
"fg" = blue.bright;
"modifiers" = [ "bold" ];
};
"ui.menu" = {
"fg" = magenta.base;
"bg" = black.base;
};
"ui.menu.scroll" = {
"fg" = yellow.dark;
"bg" = background;
};
"ui.menu.selected" = {
"fg" = red.base;
"bg" = blue.dark;
};
"ui.popup" = {
"bg" = black.base;
};
"ui.selection" = {
"bg" = white.dark;
};
"ui.selection.primary" = {
"bg" = black.bright;
};
"ui.statusline" = {
"fg" = blue.bright;
# "bg" = black.base;
};
"ui.statusline.inactive" = {
"fg" = red.bright;
"bg" = red.dark;
};
"ui.statusline.insert" = {
"fg" = green.bright;
"bg" = green.dark;
};
"ui.statusline.normal" = {
"fg" = yellow.bright;
"bg" = yellow.dark;
};
"ui.statusline.select" = {
"fg" = cyan.bright;
"bg" = cyan.dark;
};
"ui.text" = magenta.base;
"ui.text.focus" = cyan.base;
"ui.virtual.indent-guide" = {
"fg" = black.bright;
};
"ui.virtual.inlay-hint" = {
"fg" = black.bright;
};
"ui.virtual.ruler" = {
"bg" = background;
};
"ui.window" = {
"bg" = background;
};
};
};
};
}