Merge the fish config fragments back into one config.fish
The interactive init is small; four fragment files was over-splitting it. Keep the mechanic (a real fish file inlined by Nix into config.fish) but merge the fragments into a single modules/fish/config.fish read with builtins.readFile. Rendered config is unchanged.
This commit is contained in:
23
modules/fish/config.fish
Normal file
23
modules/fish/config.fish
Normal file
@@ -0,0 +1,23 @@
|
||||
# vi-style modal editing on the command line.
|
||||
set -g fish_key_bindings fish_vi_key_bindings
|
||||
|
||||
set -gx EDITOR nvim
|
||||
set -gx VISUAL nvim
|
||||
|
||||
# Render man pages through bat.
|
||||
set -x MANROFFOPT "-c"
|
||||
set -x MANPAGER "sh -c 'col -bx | bat -l man -p'"
|
||||
|
||||
# Tune the done plugin: only notify for commands past 10s, at low urgency.
|
||||
set -g __done_min_cmd_duration 10000
|
||||
set -g __done_notification_urgency_level low
|
||||
|
||||
# Prepend ~/.local/bin to PATH when it exists.
|
||||
if test -d ~/.local/bin
|
||||
fish_add_path ~/.local/bin
|
||||
end
|
||||
|
||||
# Apply fish-compatible profile overrides if present.
|
||||
if test -f ~/.fish_profile
|
||||
source ~/.fish_profile
|
||||
end
|
||||
@@ -1,2 +0,0 @@
|
||||
# vi-style modal editing on the command line.
|
||||
set -g fish_key_bindings fish_vi_key_bindings
|
||||
@@ -1,3 +0,0 @@
|
||||
# Tune the done plugin: only notify for commands past 10s, at low urgency.
|
||||
set -g __done_min_cmd_duration 10000
|
||||
set -g __done_notification_urgency_level low
|
||||
@@ -1,6 +0,0 @@
|
||||
set -gx EDITOR nvim
|
||||
set -gx VISUAL nvim
|
||||
|
||||
# Render man pages through bat.
|
||||
set -x MANROFFOPT "-c"
|
||||
set -x MANPAGER "sh -c 'col -bx | bat -l man -p'"
|
||||
@@ -1,9 +0,0 @@
|
||||
# Prepend ~/.local/bin to PATH when it exists.
|
||||
if test -d ~/.local/bin
|
||||
fish_add_path ~/.local/bin
|
||||
end
|
||||
|
||||
# Apply fish-compatible profile overrides if present.
|
||||
if test -f ~/.fish_profile
|
||||
source ~/.fish_profile
|
||||
end
|
||||
@@ -115,15 +115,9 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# config.fish is assembled here, in order, from the fragments under
|
||||
# ./config so each concern stays an editable fish file while
|
||||
# home-manager still writes a single ~/.config/fish/config.fish.
|
||||
interactiveShellInit = lib.concatMapStringsSep "\n" builtins.readFile [
|
||||
./config/bindings.fish
|
||||
./config/env.fish
|
||||
./config/done.fish
|
||||
./config/path.fish
|
||||
];
|
||||
# Read from a real fish file, which home-manager renders into
|
||||
# ~/.config/fish/config.fish.
|
||||
interactiveShellInit = builtins.readFile ./config.fish;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user