mirror of
https://github.com/willemml/dotfiles.nix.git
synced 2025-04-12 11:17:17 +00:00
Moves helix configuration into its own file
This commit is contained in:
parent
25543f4967
commit
862bed2aff
2 changed files with 52 additions and 46 deletions
|
@ -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
51
home/programs/helix.nix
Normal 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
|
||||
*/
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue