nix-infra/common/home_manager/helix.nix

287 lines
8.5 KiB
Nix

{ pkgs, lib, ... }: {
# Set editor
environment.variables.EDITOR = "hx";
home-manager.users.agatha = {
# Formatters/Language Servers that Helix uses
home.packages = with pkgs; [ nixfmt ];
programs = {
helix = {
enable = true;
package = pkgs.helix;
languages = {
language = [{
name = "nix";
auto-format = true;
formatter = { command = "nixfmt"; };
}];
};
settings = {
theme = lib.mkDefault "paramount-dark";
editor = {
middle-click-paste = false;
scroll-lines = 4;
shell = [ "fish" "-c" ];
bufferline = "multiple";
statusline = {
left = [ "mode" "spinner" "file-name" ];
right = [
"workspace-diagnostics"
"position"
"position-percentage"
"spacer"
"file-encoding"
"file-line-ending"
"file-type"
];
separator = " ";
};
cursor-shape = { insert = "bar"; };
whitespace.render = {
tab = "all";
space = "all";
newline = "none";
};
whitespace.characters = {
tab = "·";
tabpad = "·";
};
indent-guides = {
render = true;
character = "";
skip-levels = 1;
};
};
keys = {
insert = {
"C-left" = [ "move_prev_word_start" "collapse_selection" ];
"C-right" = [ "move_next_word_start" "collapse_selection" ];
};
normal = {
"C-left" = [ "move_prev_word_start" "collapse_selection" ];
"C-right" = [ "move_next_word_start" "collapse_selection" ];
"A-d" = "delete_selection";
"d" = "delete_selection_noyank";
};
};
};
themes = {
paramount-dark = let
medium_gray = "#767676";
lighter_black = "#4E4E4E";
lighter_gray = "#C6C6C6";
light_red = "#E32791";
orange = "#D75F5F";
light_green = "#5FD7A7";
dark_purple = "#af5fd7";
light_purple = "#a790d5";
dark_yellow = "#A89C14";
in {
inherits = "hex_lavender";
"ui.background" = { bg = "black"; };
"ui.gutter" = { bg = "black"; };
"ui.menu.selected" = {
fg = lighter_gray;
bg = light_purple;
};
"comment" = {
fg = lighter_black;
modifiers = [ "italic" ];
};
"constant" = light_purple;
"string" = light_purple;
"variable" = lighter_gray;
"function" = lighter_gray;
"keyword.function" = lighter_gray;
"keyword.control" = medium_gray;
"keyword.control.import" = medium_gray;
"operator" = {
fg = lighter_gray;
modifiers = [ "bold" ];
};
"function.special" = medium_gray;
"type" = lighter_gray;
"tag" = {
fg = medium_gray;
modifiers = [ "italic" ];
};
"punctuation" = { fg = medium_gray; };
"ui.linenr" = medium_gray;
"ui.linenr.selected" = { fg = light_purple; };
"string.special.url" = {
fg = lighter_gray;
underline = {
color = lighter_gray;
style = "line";
};
modifiers = [ "underlined" ];
};
"markup.link" = {
fg = lighter_gray;
underline = {
color = lighter_gray;
style = "line";
};
modifiers = [ "underlined" ];
};
"diagnostic.error" = {
underline = {
color = light_red;
style = "curl";
};
};
"error" = light_red;
"diagnostic.hint" = {
underline = {
color = lighter_gray;
style = "curl";
};
};
"hint" = lighter_gray;
"ui.selection" = {
fg = lighter_gray;
bg = light_purple;
};
"ui.selection.primary" = {
fg = lighter_gray;
bg = light_purple;
};
"warning" = orange;
"diagnostic.warning" = {
underline = {
color = orange;
style = "curl";
};
};
"diff.plus" = light_green;
"diff.minus" = light_red;
"diff.delta" = dark_yellow;
"ui.cursor" = { bg = lighter_gray; };
"ui.cursor.insert" = { bg = light_purple; };
"ui.cursor.select" = { bg = dark_purple; };
"ui.cursor.match" = {
fg = lighter_gray;
bg = medium_gray;
};
"namespace" = medium_gray;
};
paramount-light = let
medium_gray = "#767676";
actual_white = "#FFFFFF";
light_black = "#262626";
dark_red = "#C30771";
orange = "#D75F5F";
dark_green = "#10A778";
dark_purple = "#af5fd7";
dark_yellow = "#A89C14";
in {
inherits = "spacebones_light";
"ui.background" = { bg = actual_white; };
"ui.gutter" = { bg = actual_white; };
"ui.menu.selected" = {
fg = light_black;
bg = dark_purple;
};
"comment" = {
fg = "dark_gray";
modifiers = [ "italic" ];
};
"constant" = dark_purple;
"string" = dark_purple;
"variable" = light_black;
"variable.parameter" = light_black;
"function" = light_black;
"keyword" = medium_gray;
"keyword.function" = light_black;
"keyword.control" = medium_gray;
"keyword.control.import" = medium_gray;
"operator" = {
fg = light_black;
modifiers = [ "bold" ];
};
"function.special" = medium_gray;
"function.macro" = medium_gray;
"type" = light_black;
"type.builtin" = light_black;
"tag" = {
fg = medium_gray;
modifiers = [ "italic" ];
};
"punctuation" = { fg = medium_gray; };
"ui.linenr" = medium_gray;
"ui.linenr.selected" = { fg = dark_purple; };
"string.special.url" = {
fg = light_black;
underline = {
color = light_black;
style = "line";
};
modifiers = [ "underlined" ];
};
"markup.link" = {
fg = light_black;
underline = {
color = light_black;
style = "line";
};
modifiers = [ "underlined" ];
};
"diagnostic.error" = {
underline = {
color = dark_red;
style = "curl";
};
};
"error" = dark_red;
"diagnostic.hint" = {
underline = {
color = light_black;
style = "curl";
};
};
"hint" = light_black;
"ui.selection" = {
fg = light_black;
bg = dark_purple;
};
"ui.selection.primary" = {
fg = light_black;
bg = dark_purple;
};
"warning" = orange;
"diagnostic.warning" = {
underline = {
color = orange;
style = "curl";
};
};
"diff.plus" = dark_green;
"diff.minus" = dark_red;
"diff.delta" = dark_yellow;
"ui.cursor" = { bg = light_black; };
"ui.cursor.insert" = { bg = dark_purple; };
"ui.cursor.select" = { bg = dark_purple; };
"ui.cursor.match" = {
fg = light_black;
bg = medium_gray;
};
"namespace" = medium_gray;
"special" = medium_gray;
};
};
};
};
};
}