create helix module

This commit is contained in:
Leonardo Eugênio 2022-08-04 23:50:58 -03:00
parent 18e527080a
commit 085772367c
2 changed files with 70 additions and 61 deletions

69
user/helix.nix Normal file
View file

@ -0,0 +1,69 @@
{ config, pkgs, lib, font, ... }: let
inherit (import ./variables.nix) key theme color accent font;
in {
config = {
programs.helix = {
enable = true;
package = pkgs.unstable.helix;
settings = {
theme = "gruvbox";
editor = {
whitespace.render = "all";
whitespace.characters = {
space = "·";
tab = "";
newline = "¬";
};
};
keys.normal = {
# basic movement
n = "move_char_left";
e = "move_line_down";
i = "move_line_up";
o = "move_char_right";
# search
l = "search_next";
L = "search_prev";
# edits
s = "insert_mode";
# open newline
h = "open_below";
H = "open_above";
# selections
k = "select_regex";
K = "split_selection";
"C-k" = "split_selection_on_newline";
# goto mode
g.n = "goto_line_start";
g.o = "goto_line_end";
};
keys.select = {
# basic movement
n = "extend_char_left";
e = "extend_line_down";
i = "extend_line_up";
o = "extend_char_right";
# search
l = "search_next";
L = "search_prev";
# edits
s = "insert_mode";
# open newline
h = "open_below";
H = "open_above";
# selections
k = "select_regex";
K = "split_selection";
"C-k" = "split_selection_on_newline";
# goto mode
g.n = "goto_line_start";
g.o = "goto_line_end";
};
keys.insert = { "A-k" = "normal_mode"; };
};
};
home.packages = with pkgs; [
pkgs.unstable.helix
];
};
}

View file

@ -122,6 +122,7 @@ let
in {
imports = [
./waybar.nix
./helix.nix
];
# Home Manager needs a bit of information about you and the
# paths it should manage.
@ -143,7 +144,6 @@ in {
exa
fd
# text manipulation
pkgs.unstable.helix
sd
ripgrep
# desktop
@ -359,66 +359,6 @@ in {
};
};
programs.helix = {
enable = true;
package = pkgs.unstable.helix;
settings = {
theme = "gruvbox";
editor = {
whitespace.render = "all";
whitespace.characters = {
space = "·";
tab = "";
newline = "¬";
};
};
keys.normal = {
# basic movement
n = "move_char_left";
e = "move_line_down";
i = "move_line_up";
o = "move_char_right";
# search
l = "search_next";
L = "search_prev";
# edits
s = "insert_mode";
# open newline
h = "open_below";
H = "open_above";
# selections
k = "select_regex";
K = "split_selection";
"C-k" = "split_selection_on_newline";
# goto mode
g.n = "goto_line_start";
g.o = "goto_line_end";
};
keys.select = {
# basic movement
n = "extend_char_left";
e = "extend_line_down";
i = "extend_line_up";
o = "extend_char_right";
# search
l = "search_next";
L = "search_prev";
# edits
s = "insert_mode";
# open newline
h = "open_below";
H = "open_above";
# selections
k = "select_regex";
K = "split_selection";
"C-k" = "split_selection_on_newline";
# goto mode
g.n = "goto_line_start";
g.o = "goto_line_end";
};
keys.insert = { "A-k" = "normal_mode"; };
};
};
programs.kakoune = {
enable = true;
extraConfig = let