From 085772367cfaa26033e71085d66c43a7d3a6942b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 4 Aug 2022 23:50:58 -0300 Subject: [PATCH] create helix module --- user/helix.nix | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++ user/home.nix | 62 +-------------------------------------------- 2 files changed, 70 insertions(+), 61 deletions(-) create mode 100644 user/helix.nix diff --git a/user/helix.nix b/user/helix.nix new file mode 100644 index 0000000..04e4e97 --- /dev/null +++ b/user/helix.nix @@ -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 + ]; + }; +} diff --git a/user/home.nix b/user/home.nix index 80b9c24..93c692b 100644 --- a/user/home.nix +++ b/user/home.nix @@ -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