idiosyn/home/config/nil/editor.nix

80 lines
1.7 KiB
Nix
Raw Normal View History

{ ... }: { config, lib, ... }: {
programs.helix = {
enable = true;
defaultEditor = true;
settings = {
theme = lib.mkForce "catppuccin_mocha";
2024-09-28 13:00:07 +02:00
editor = {
rulers = [ 80 120 ];
2024-09-28 13:39:19 +02:00
indent-guides = {
render = true;
character = "";
};
2024-09-28 13:00:07 +02:00
auto-pairs = {
"" = "";
"" = "";
"" = "";
"" = "";
};
2024-09-28 13:00:07 +02:00
whitespace = {
render = {
nbsp = "all";
nnbsp = "all";
};
2024-09-28 13:00:07 +02:00
characters = {
nbsp = "";
nnbsp = "";
};
};
};
2024-09-28 13:17:45 +02:00
keys = {
normal = {
minus = "command_mode";
2024-09-28 13:17:45 +02:00
r = "move_char_left";
n = "move_visual_line_down";
t = "move_visual_line_up";
h = "move_char_right";
2024-09-28 13:17:45 +02:00
p = "move_prev_word_start";
w = "move_next_word_start";
l = "move_next_word_end";
P = "move_prev_long_word_start";
W = "move_next_long_word_start";
L = "move_next_long_word_end";
2024-09-28 13:17:45 +02:00
z = "replace";
Z = "replace_with_yanked";
2024-09-28 13:17:45 +02:00
s = "paste_after";
S = "paste_before";
2024-09-28 13:17:45 +02:00
x = "extend_line_below";
X = "extend_to_line_bounds";
A-X = "shrink_to_line_bounds";
2024-09-28 13:17:45 +02:00
e = "change_selection";
A-e = "change_selection_noyank";
2024-09-28 13:17:45 +02:00
N = "join_selections";
A-N = "join_selections_space";
2024-09-28 13:17:45 +02:00
";" = "search_next";
":" = "search_prev";
};
insert = {
"C-i" = "smart_tab";
"C-S-i" = "insert_tab";
};
};
};
};
}