Split config.fish into repo fragments, concatenated by Nix
Break the interactive init into concern-scoped fish files under modules/fish/config/ (bindings, env, done, path) and assemble them with lib.concatMapStringsSep + readFile into a single interactiveShellInit, so home-manager still writes one ~/.config/fish/config.fish. The pieces stay editable as separate fish files; the rendered file is unchanged.
This commit is contained in:
2
modules/fish/config/bindings.fish
Normal file
2
modules/fish/config/bindings.fish
Normal file
@@ -0,0 +1,2 @@
|
||||
# vi-style modal editing on the command line.
|
||||
set -g fish_key_bindings fish_vi_key_bindings
|
||||
3
modules/fish/config/done.fish
Normal file
3
modules/fish/config/done.fish
Normal file
@@ -0,0 +1,3 @@
|
||||
# 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
|
||||
6
modules/fish/config/env.fish
Normal file
6
modules/fish/config/env.fish
Normal file
@@ -0,0 +1,6 @@
|
||||
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'"
|
||||
9
modules/fish/config/path.fish
Normal file
9
modules/fish/config/path.fish
Normal file
@@ -0,0 +1,9 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user