flocon/home/programs/editors/helix.nix

64 lines
1.3 KiB
Nix
Raw Normal View History

{
lib,
pkgs,
...
}: let
inherit (lib) getExe;
in {
programs.helix = {
enable = true;
settings = {
theme = "catppuccin_macchiato";
editor = {
line-number = "relative";
lsp.display-messages = true;
auto-format = true;
auto-completion = true;
completion-timeout = 5;
2024-10-14 21:52:35 +00:00
color-modes = true;
completion-trigger-len = 1;
completion-replace = true;
cursorline = true;
cursor-shape = {
insert = "bar";
normal = "block";
select = "underline";
};
indent-guides.render = true;
lsp.display-inlay-hints = true;
statusline.center = ["position-percentage"];
true-color = true;
whitespace.characters = {
newline = "";
tab = "";
};
};
2024-10-14 21:52:35 +00:00
keys.normal = {
space = {
space = "file_picker";
w = ":w";
q = ":q";
};
esc = ["collapse_selection" "keep_primary_selection"];
};
};
languages = {
language = [
{
name = "nix";
2024-10-14 21:52:35 +00:00
auto-format = true;
}
];
2024-10-14 21:52:35 +00:00
language-server = {
nil = {
command = lib.getExe pkgs.nil;
config.nil.formatting.command = ["${lib.getExe pkgs.alejandra}" "-q"];
};
};
};
};
}