nixos-config/home/editors/helix/default.nix

69 lines
1.5 KiB
Nix
Raw Normal View History

2022-08-02 20:10:44 +02:00
{ config, lib, pkgs, ... }:
{
2023-05-31 16:03:24 +02:00
# @TODO for direnv to work needs to be started from project folder
2022-08-02 20:10:44 +02:00
programs.helix = {
enable = true;
package = pkgs.unstable.helix;
2023-05-31 17:25:46 +02:00
languages.language = [
2023-05-31 16:03:24 +02:00
{
name = "rust";
config.rust-analyzer = {
cargo.buildScripts.enable = true;
checkOnSave.command = "clippy";
procMacro.enable = true;
procMacro.ignored = {
# cfg_eval can cause types to be unavailable
core = [ "cfg_eval" ];
cfg_eval = [ "cfg_eval" ];
};
2023-05-31 16:03:24 +02:00
};
}
{
name = "nix";
formatter.command = "nixfmt";
}
{
name = "nickel";
formatter.command = "topiary";
}
];
settings = {
2023-05-31 16:03:24 +02:00
theme = "github_dark";
editor = {
color-modes = true;
cursor-shape.insert = "bar";
completion-trigger-len = 1;
statusline = {
left = [
"mode"
"version-control"
"spinner"
"file-name"
"file-modification-indicator"
];
right = [
"diagnostics"
"file-encoding"
"file-line-ending"
"file-type"
"selections"
"position"
];
};
};
# @TODO try helix-vim
keys = {
normal = {
"H" = "goto_line_start";
"L" = "goto_line_end";
};
select = {
"H" = "goto_line_start";
"L" = "goto_line_end";
};
};
};
2022-08-02 20:10:44 +02:00
};
}