zsh: configure fzf
This commit is contained in:
@@ -1,9 +1,26 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
promptColours.success = "cyan";
|
promptColours.success = "cyan";
|
||||||
promptColours.failure = "red";
|
promptColours.failure = "red";
|
||||||
in
|
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 =
|
programs.zsh =
|
||||||
let
|
let
|
||||||
zsh-completions = pkgs.fetchFromGitHub {
|
zsh-completions = pkgs.fetchFromGitHub {
|
||||||
|
|||||||
Reference in New Issue
Block a user