zsh: configure fzf
This commit is contained in:
@@ -1,9 +1,26 @@
|
||||
{ pkgs, ... }:
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
promptColours.success = "cyan";
|
||||
promptColours.failure = "red";
|
||||
in
|
||||
{
|
||||
programs.fzf = {
|
||||
fuzzyCompletion = true;
|
||||
keybindings = true;
|
||||
};
|
||||
|
||||
environment.variables =
|
||||
let
|
||||
defaultFzf = "${lib.getExe pkgs.fd}/bin/fd --type f --strip-cwd-prefix --no-ignore-vcs --exclude .git";
|
||||
in
|
||||
{
|
||||
FZF_DEFAULT_COMMAND = defaultFzf;
|
||||
FZF_DEFAULT_OPTS = "--height 40%";
|
||||
FZF_CTRL_T_COMMAND = defaultFzf;
|
||||
FZF_CTRL_T_OPTS = "--preview='head -$LINES {}'";
|
||||
FZF_ALT_C_COMMAND = "${lib.getExe pkgs.fd}/bin/fd --type d";
|
||||
};
|
||||
|
||||
programs.zsh =
|
||||
let
|
||||
zsh-completions = pkgs.fetchFromGitHub {
|
||||
|
||||
Reference in New Issue
Block a user