2024-02-01 23:01:05 -08:00
|
|
|
{ inputs, pkgs, ... }: {
|
2024-01-30 10:46:26 -08:00
|
|
|
programs.helix = {
|
|
|
|
|
settings = {
|
|
|
|
|
theme = "dracula";
|
|
|
|
|
editor = {
|
|
|
|
|
line-number = "relative";
|
|
|
|
|
cursorline = true;
|
|
|
|
|
completion-replace = true;
|
|
|
|
|
preview-completion-insert = false;
|
|
|
|
|
indent-guides = {
|
|
|
|
|
render = true;
|
|
|
|
|
skip-levels = 2;
|
|
|
|
|
};
|
|
|
|
|
cursor-shape = {
|
|
|
|
|
insert = "bar";
|
|
|
|
|
select = "underline";
|
|
|
|
|
};
|
|
|
|
|
statusline = {
|
|
|
|
|
left = [ "mode" "spinner" "spacer" "version-control" ];
|
|
|
|
|
center = [ "file-name" "file-modification-indicator" ];
|
|
|
|
|
right = [ "diagnostics" "primary-selection-length" "total-line-numbers" "selections" "position" ];
|
|
|
|
|
};
|
|
|
|
|
lsp = {
|
|
|
|
|
display-messages = true;
|
|
|
|
|
display-inlay-hints = true;
|
|
|
|
|
};
|
2024-01-31 17:34:09 -08:00
|
|
|
soft-wrap.enable = true;
|
2024-01-30 10:46:26 -08:00
|
|
|
};
|
2024-02-21 18:15:57 -08:00
|
|
|
keys.normal = {
|
|
|
|
|
k = "move_line_down";
|
|
|
|
|
j = "move_line_up";
|
|
|
|
|
};
|
|
|
|
|
keys.select = {
|
|
|
|
|
k = "move_line_down";
|
|
|
|
|
j = "move_line_up";
|
|
|
|
|
};
|
2024-01-30 10:46:26 -08:00
|
|
|
};
|
|
|
|
|
languages = {
|
|
|
|
|
language = [
|
|
|
|
|
{
|
|
|
|
|
name = "c";
|
|
|
|
|
auto-format = true;
|
|
|
|
|
formatter = {
|
|
|
|
|
command = "clang-format";
|
|
|
|
|
args = [ "--style=file:/home/tao/Templates/clang-format" ];
|
|
|
|
|
};
|
2024-02-06 11:08:27 -08:00
|
|
|
indent = { tab-width = 8; unit = "\t"; };
|
2024-01-30 10:46:26 -08:00
|
|
|
}
|
2024-02-21 18:15:57 -08:00
|
|
|
# { name = "css"; comment = "/*"; }
|
2024-02-08 09:07:51 -08:00
|
|
|
{ name = "html"; auto-format = false; indent = { tab-width = 4; unit = "\t"; }; }
|
2024-02-12 16:50:32 -08:00
|
|
|
{ name = "java"; auto-format = true; indent = { tab-width = 4; unit = "\t"; }; }
|
2024-02-08 09:07:51 -08:00
|
|
|
{ name = "nix"; auto-format = true; formatter = { command = "nixpkgs-fmt"; }; }
|
2024-02-10 18:59:58 -08:00
|
|
|
{ name = "typst"; indent = { tab-width = 4; unit = " "; }; }
|
2024-02-21 18:15:57 -08:00
|
|
|
# { name = "rust"; }
|
2024-01-30 10:46:26 -08:00
|
|
|
];
|
2024-02-19 22:41:58 -08:00
|
|
|
language-servers = {
|
|
|
|
|
rust-analyzer.config = {
|
|
|
|
|
procMacro = {
|
|
|
|
|
ignored = {
|
|
|
|
|
leptos_macro = [
|
|
|
|
|
# Optional:
|
|
|
|
|
# "component",
|
|
|
|
|
"server"
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
2024-02-01 19:24:36 -08:00
|
|
|
grammar = [
|
|
|
|
|
{
|
|
|
|
|
name = "nix";
|
|
|
|
|
source = {
|
|
|
|
|
git = "https://github.com/nix-community/tree-sitter-nix";
|
|
|
|
|
rev = "763168fa916a333a459434f1424b5d30645f015d";
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
];
|
2024-01-30 10:46:26 -08:00
|
|
|
};
|
2024-01-30 11:08:42 -08:00
|
|
|
enable = true;
|
|
|
|
|
defaultEditor = true;
|
2024-02-01 23:01:05 -08:00
|
|
|
package = inputs.helix.packages.${pkgs.system}.default;
|
2024-01-30 10:46:26 -08:00
|
|
|
};
|
|
|
|
|
}
|