Skip to content

Commit

Permalink
Init Helix editor config
Browse files Browse the repository at this point in the history
  • Loading branch information
foofrog committed Jun 24, 2024
1 parent e06af05 commit b31938d
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# TODO: Split `./programs.nix` into files under `./programs` directory for program-specific configurations
{pkgs, ...}: {
imports = [
./helix.nix
./nushell.nix
./xdg.nix
];
Expand Down
31 changes: 31 additions & 0 deletions modules/environment/users/foo/home-depot/programs/helix.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
_: {
programs.helix = {
enable = true;

# Set `hx` command as the default editor using the `EDITOR` environment variable
defaultEditor = true;

settings = {
theme = "base16_transparent";

editor = {
line-number = "relative";
mouse = false;

cursor-shape = {
insert = "bar";
normal = "block";
select = "underline";
};

soft-wrap = {
enable = true;

wrap-at-text-width = true;
};

file-picker.hidden = false;
};
};
};
}
8 changes: 4 additions & 4 deletions modules/environment/users/foo/home-depot/programs/nushell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ _: {
"cat" = "bat --style header --style snip --style changes --style header";
};

environmentVariables = {
EDITOR = "hx";
};
# environmentVariables = {
# EDITOR = "hx"; # NOTE: Not necessary as it is already set in `./helix.nix` file
# };

extraEnv = ''
# Disable Nushell welcome message
Expand All @@ -32,7 +32,7 @@ _: {

starship = {
enable = true;
# enableFishIntegration = false;

enableNushellIntegration = true;
};

Expand Down

0 comments on commit b31938d

Please sign in to comment.