I want to disable sourcing fish scripts bundled with fzf (so I can use fzf.fish plugin exclusively). It seems like this should be possible with:
programs.fish = {
enable = true;
# fzf conflicts with fish.fzf plugin so we don't load configs provided by other packages...
vendor.functions.enable = false;
vendor.config.enable = false;
# ... and load the ones we like manually
# check `ls -alh /run/current-system/sw/share/fish/vendor_conf.d` for a full list
shellInit = ''
source ${pkgs.direnv}/share/fish/vendor_conf.d/direnv.fish
source ${pkgs.fishPlugins.fzf-fish}/share/fish/vendor_conf.d/fzf.fish
'';
};
My understanding is setting these to false will make this:
not link these config to profile.
However it doesn’t seem to work:
> ls /run/current-system/sw/share/fish/vendor_conf.d
direnv.fish fzf.fish load-fzf-key-bindings.fish
Am I misunderstanding something? Any ideas why is not working?
I’m interested in fixing this, so I’m posting here to remind myself to come back to it.
Note that normally (outside of a Nix context), you’d disable a vendor-supplied config snippet by preempting it in Fish’s config sourcing path with a file of the same name. So to completely disable vendor_conf.d/fzf.fish, you’d just create an empty file at ~/.config/fish/conf.d/fzf.fish. So the presence of the vendor-supplied config file in your Nix profile doesn’t necessarily mean that the integration is enabled.
I was checking using the 3 bindings fzf enables. Worked around it by unbinding, then rebinding to the fishPlugin functions but the empty file could be an option.