Moves helix configuration into its own file

This commit is contained in:
willemml 2024-03-15 09:26:56 -07:00
parent 25543f4967
commit 862bed2aff
Signed by: willemml
GPG key ID: C3DE5DF6198DACBD
2 changed files with 52 additions and 46 deletions

View file

@ -6,57 +6,12 @@
...
}: {
imports = [
./helix.nix
./ssh.nix
./zsh.nix
];
programs = {
helix = {
enable = true;
languages.language = [
{
name = "nix";
auto-format = true;
language-servers = ["nixd-lsp"];
formatter = {command = "${pkgs.alejandra}/bin/alejandra";};
}
];
languages.language-server.nixd-lsp.command = "${inputs.nixd.packages.${pkgs.system}.default}/bin/nixd";
settings.editor.line-number = "relative";
settings.keys = {
normal = {
space.w = ":w";
space.q = ":q";
/*
remap for colemak
*/
n = "move_line_down";
N = "keep_selections";
k = "search_next";
K = "search_prev";
# E <=> J (swap actions)
j = "move_next_word_end";
J = "move_next_long_word_end";
e = "move_line_up";
E = "join_selections";
# ILU loop
# I => L
i = "move_char_right";
I = "no_op";
# U => I (QWERTY position)
u = "insert_mode";
U = "insert_at_line_start";
# L => U (QWERTY position)
l = "undo";
L = "redo";
/*
end colemak remap
*/
};
};
};
nix-index-database.comma.enable = true;
bash.enableCompletion = true;

51
home/programs/helix.nix Normal file
View file

@ -0,0 +1,51 @@
{
inputs,
pkgs,
...
}: {
programs.helix = {
enable = true;
languages.language = [
{
name = "nix";
auto-format = true;
language-servers = ["nixd-lsp"];
formatter = {command = "${pkgs.alejandra}/bin/alejandra";};
}
];
languages.language-server.nixd-lsp.command = "${inputs.nixd.packages.${pkgs.system}.default}/bin/nixd";
settings.editor.line-number = "relative";
settings.keys = {
normal = {
space.w = ":w";
space.q = ":q";
/*
remap for colemak
*/
n = "move_line_down";
N = "keep_selections";
k = "search_next";
K = "search_prev";
# E <=> J (swap actions)
j = "move_next_word_end";
J = "move_next_long_word_end";
e = "move_line_up";
E = "join_selections";
# ILU loop
# I => L
i = "move_char_right";
I = "no_op";
# U => I (QWERTY position)
u = "insert_mode";
U = "insert_at_line_start";
# L => U (QWERTY position)
l = "undo";
L = "redo";
/*
end colemak remap
*/
};
};
};
}