linted
This commit is contained in:
atagen 2025-02-02 16:57:31 +11:00
parent 4e99a0e323
commit 7485de646a
95 changed files with 2743 additions and 2282 deletions

View file

@ -3,16 +3,19 @@
lib,
pkgs,
...
}: let
}:
let
palette-hex = pkgs.lib.nix-rice.palette.toRgbHex pkgs.rice.palette;
palette-shex = pkgs.lib.nix-rice.palette.toRGBShortHex pkgs.rice.palette;
in {
in
{
programs.helix = {
enable = true;
themes = with palette-hex; {
nix-rice = {
"attribute" = bright.cyan;
"keyword" = {fg = normal.red;};
"keyword" = {
fg = normal.red;
};
"keyword.directive" = normal.red;
"namespace" = bright.cyan;
"punctuation" = bright.yellow;
@ -27,29 +30,31 @@ in {
"type.builtin" = normal.yellow;
"constructor" = {
fg = bright.magenta;
modifiers = ["bold"];
modifiers = [ "bold" ];
};
"function" = {
fg = normal.green;
modifiers = ["bold"];
modifiers = [ "bold" ];
};
"function.macro" = bright.cyan;
"function.builtin" = normal.yellow;
"tag" = normal.red;
"comment" = {
fg = normal.magenta;
modifiers = ["italic"];
modifiers = [ "italic" ];
};
"constant" = {
fg = bright.magenta;
};
"constant" = {fg = bright.magenta;};
"constant.builtin" = {
fg = bright.magenta;
modifiers = ["bold"];
modifiers = [ "bold" ];
};
"string" = normal.green;
"constant.numeric" = bright.magenta;
"constant.character.escape" = {
fg = bright.white;
modifiers = ["bold"];
modifiers = [ "bold" ];
};
"label" = bright.cyan;
"module" = bright.cyan;
@ -60,64 +65,86 @@ in {
"error" = bright.red;
"info" = bright.cyan;
"hint" = bright.blue;
"ui.background" = {bg = util.bg;};
"ui.linenr" = {fg = normal.cyan;};
"ui.background" = {
inherit (util) bg;
};
"ui.linenr" = {
fg = normal.cyan;
};
"ui.linenr.selected" = {
fg = normal.yellow;
modifiers = ["bold"];
modifiers = [ "bold" ];
};
"ui.cursorline" = {
bg = normal.black;
};
"ui.cursorline" = {bg = normal.black;};
"ui.statusline" = {
fg = util.fg;
inherit (util) fg;
bg = bright.black;
};
"ui.statusline.normal" = {
fg = util.fg;
inherit (util) fg;
bg = bright.black;
};
"ui.statusline.insert" = {
fg = util.fg;
inherit (util) fg;
bg = normal.blue;
};
"ui.statusline.select" = {
fg = util.fg;
inherit (util) fg;
bg = bright.yellow;
};
"ui.statusline.inactive" = {
fg = normal.white;
bg = normal.black;
};
"ui.popup" = {bg = normal.black;};
"ui.window" = {bg = normal.black;};
"ui.popup" = {
bg = normal.black;
};
"ui.window" = {
bg = normal.black;
};
"ui.help" = {
bg = normal.black;
fg = util.fg;
inherit (util) fg;
};
"ui.text" = {
inherit (util) fg;
};
"ui.text.focus" = {
inherit (util) fg;
};
"ui.text" = {fg = util.fg;};
"ui.text.focus" = {fg = util.fg;};
"ui.selection" = {
# modifiers = ["reversed"];
bg = bright.yellow;
};
"ui.selection.primary" = {modifiers = ["reversed"];};
"ui.selection.primary" = {
modifiers = [ "reversed" ];
};
# "ui.selection.primary" = { bg = bright.cyan; };
"ui.cursor.primary" = {
bg = normal.white;
fg = normal.black;
};
"ui.cursor.match" = {bg = bright.cyan;};
"ui.cursor.match" = {
bg = bright.cyan;
};
"ui.menu" = {
fg = util.fg;
inherit (util) fg;
bg = bright.black;
};
"ui.menu.selected" = {
fg = bright.black;
bg = bright.blue;
modifiers = ["bold"];
modifiers = [ "bold" ];
};
"ui.virtual.whitespace" = bright.black;
"ui.virtual.ruler" = {bg = normal.black;};
"ui.virtual.inlay-hint" = {fg = normal.magenta;};
"ui.virtual.ruler" = {
bg = normal.black;
};
"ui.virtual.inlay-hint" = {
fg = normal.magenta;
};
"diagnostic.warning" = {
underline = {
color = bright.yellow;
@ -143,12 +170,18 @@ in {
};
};
"markup.heading" = bright.cyan;
"markup.bold" = {modifiers = ["bold"];};
"markup.italic" = {modifiers = ["italic"];};
"markup.strikethrough" = {modifiers = ["crossed_out"];};
"markup.bold" = {
modifiers = [ "bold" ];
};
"markup.italic" = {
modifiers = [ "italic" ];
};
"markup.strikethrough" = {
modifiers = [ "crossed_out" ];
};
"markup.link.url" = {
fg = bright.green;
modifiers = ["underlined"];
modifiers = [ "underlined" ];
};
"markup.link.text" = bright.red;
"markup.raw" = bright.red;
@ -184,17 +217,28 @@ in {
normal = "block";
select = "underline";
};
statusline.left = ["mode" "spinner" "version-control" "file-name" "file-modification-indicator"];
statusline.left = [
"mode"
"spinner"
"version-control"
"file-name"
"file-modification-indicator"
];
lsp.display-messages = true;
keys = let
extend = {
"A-x" = "extend_to_line_bounds";
"X" = ["extend_line_up" "extend_to_line_bounds"];
keys =
let
extend = {
"A-x" = "extend_to_line_bounds";
"X" = [
"extend_line_up"
"extend_to_line_bounds"
];
};
in
{
normal = extend;
select = extend;
};
in {
normal = extend;
select = extend;
};
};
};
@ -202,13 +246,19 @@ in {
language = [
{
name = "rust";
language-servers = ["rust-analyzer" "lsp-ai"];
language-servers = [
"rust-analyzer"
"lsp-ai"
];
auto-format = true;
}
{
name = "nix";
language-servers = ["nixd" "lsp-ai"];
file-types = ["nix"];
language-servers = [
"nixd"
"lsp-ai"
];
file-types = [ "nix" ];
# auto-format = true;
formatter = {
command = "alejandra";
@ -216,8 +266,14 @@ in {
}
{
name = "ocaml";
language-servers = ["ocamllsp" "lsp-ai"];
file-types = ["ml" "mli"];
language-servers = [
"ocamllsp"
"lsp-ai"
];
file-types = [
"ml"
"mli"
];
auto-format = true;
formatter = {
command = "ocamlformat";
@ -233,7 +289,7 @@ in {
lsp-ai = {
command = "lsp-ai";
config = {
memory.fileStore = {};
memory.fileStore = { };
models = {
llama32 = {
type = "ollama";
@ -285,7 +341,7 @@ in {
};
};
};
}; #language-server
}; #languages
}; #helix config
}; # language-server
}; # languages
}; # helix config
}