mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-22 00:21:34 +01:00
Improve zsh completion
This commit is contained in:
parent
c98192eb68
commit
d422206b97
1 changed files with 21 additions and 1 deletions
|
|
@ -1,4 +1,9 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./p10k
|
||||
|
|
@ -22,6 +27,14 @@
|
|||
path = "${config.xdg.dataHome}/zsh/zsh_history";
|
||||
};
|
||||
|
||||
plugins = [
|
||||
{
|
||||
name = "fzf-tab";
|
||||
src = pkgs.zsh-fzf-tab;
|
||||
file = "share/fzf-tab/fzf-tab.plugin.zsh";
|
||||
}
|
||||
];
|
||||
|
||||
initExtraFirst = ''
|
||||
(( ''${+commands[direnv]} )) && emulate zsh -c "$(direnv export zsh)"
|
||||
|
||||
|
|
@ -31,6 +44,13 @@
|
|||
|
||||
(( ''${+commands[direnv]} )) && emulate zsh -c "$(direnv hook zsh)"
|
||||
'';
|
||||
|
||||
initExtra = ''
|
||||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-Z}'
|
||||
zstyle ':completion:*' list-colors ''${(s.:.)LS_COLORS}
|
||||
zstyle ':completion:*' menu no
|
||||
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls $realpath'
|
||||
'';
|
||||
};
|
||||
|
||||
programs.fzf.enable = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue