dotfiles/nixos/home-manager/programs/helix.nix

64 lines
1.7 KiB
Nix
Raw Normal View History

2022-12-19 09:04:27 +00:00
{
config,
pkgs,
lib,
inputs,
system,
...
}: let
alejandra = lib.getExe inputs.alejandra.packages.${system}.default;
nil = lib.getExe inputs.nil.packages.${system}.default;
in {
2022-12-07 23:52:15 +00:00
programs.helix = {
enable = true;
package = inputs.helix.packages."${system}".helix;
2022-12-19 09:04:27 +00:00
settings = {
2022-12-19 09:29:34 +00:00
editor = {
auto-pairs = false;
lsp.display-messages = true;
line-number = "relative";
};
2022-12-19 09:04:27 +00:00
keys.normal = {
C-p = "file_picker";
C-b = "buffer_picker";
2022-12-19 09:29:34 +00:00
"{" = ["goto_prev_paragraph" "collapse_selection"];
"}" = ["goto_next_paragraph" "collapse_selection"];
"0" = "goto_line_start";
"$" = "goto_line_end";
"^" = "goto_first_nonwhitespace";
G = "goto_file_end";
V = ["select_mode" "extend_to_line_bounds"];
};
select = {
"{" = ["extend_to_line_bounds" "goto_prev_paragraph"];
"}" = ["extend_to_line_bounds" "goto_next_paragraph"];
"0" = "goto_line_start";
"$" = "goto_line_end";
"^" = "goto_first_nonwhitespace";
G = "goto_file_end";
D = ["extend_to_line_bounds" "delete_selection" "normal_mode"];
C = ["goto_line_start" "extend_to_line_bounds" "change_selection"];
"%" = "match_brackets";
V = ["extend_to_line_bounds"];
i = "select_textobject_inner";
a = "select_textobject_around";
k = ["extend_line_up" "extend_to_line_bounds"];
j = ["extend_line_down" "extend_to_line_bounds"];
2022-12-08 20:02:21 +00:00
};
2022-12-19 09:04:27 +00:00
};
languages = [
{
name = "nix";
auto-format = true;
language-server = {command = nil;};
formatter = {
command = alejandra;
args = ["-q"];
};
}
];
2022-12-07 23:52:15 +00:00
};
}