From 29bd2ab5b80b67cc15c8179b45234a8ae9dbc81e Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Mon, 14 Oct 2024 17:23:36 +0200 Subject: [PATCH] programs/editors/helix: add helix editor --- home/profiles/vamos/default.nix | 1 + home/programs/editors/helix.nix | 41 +++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 home/programs/editors/helix.nix diff --git a/home/profiles/vamos/default.nix b/home/profiles/vamos/default.nix index 811c76f..ec3db00 100644 --- a/home/profiles/vamos/default.nix +++ b/home/profiles/vamos/default.nix @@ -14,5 +14,6 @@ "${self}/home/terminal/emulators/foot.nix" "${self}/home/programs/editors/neovim.nix" + "${self}/home/programs/editors/helix.nix" ]; } diff --git a/home/programs/editors/helix.nix b/home/programs/editors/helix.nix new file mode 100644 index 0000000..c722d8b --- /dev/null +++ b/home/programs/editors/helix.nix @@ -0,0 +1,41 @@ +{ + lib, + pkgs, + ... +}: let + inherit (lib) getExe; +in { + programs.helix = { + enable = true; + settings = { + theme = "catppuccin_macchiato"; + editor = { + line-number = "relative"; + lsp.display-messages = true; + auto-format = true; + auto-completion = true; + completion-timeout = 5; + }; + keys.normal = { + space = { + space = "file_picker"; + w = ":w"; + q = ":q"; + }; + esc = ["collapse_selection" "keep_primary_selection"]; + }; + }; + + languages = { + language = [ + { + name = "nix"; + formatter = {command = getExe pkgs.alejandra;}; + } + ]; + }; + }; + home.packages = [ + pkgs.nil + ]; +}