Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto complete does not work in zinit #7

Open
on99 opened this issue Nov 18, 2020 · 0 comments
Open

Auto complete does not work in zinit #7

on99 opened this issue Nov 18, 2020 · 0 comments

Comments

@on99
Copy link

on99 commented Nov 18, 2020

Hi, I found auto complete does not work in zinit.

image
image

In the second image, when I type kubens[SPACE][TAB] fzf should list out all the k8s namespaces, instead of all files/directories in the current directory.

Can you please help? My setup is Ubuntu 18.04, zsh 5.4 and .zshrc

# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
  source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi


### Added by Zinit's installer
if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then
    print -P "%F{33}▓▒░ %F{220}Installing %F{33}DHARMA%F{220} Initiative Plugin Manager (%F{33}zdharma/zinit%F{220})…%f"
    command mkdir -p "$HOME/.zinit" && command chmod g-rwX "$HOME/.zinit"
    command git clone https://github.com/zdharma/zinit "$HOME/.zinit/bin" && \
        print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \
        print -P "%F{160}▓▒░ The clone has failed.%f%b"
fi

source "$HOME/.zinit/bin/zinit.zsh"
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit


# Load a few important annexes, without Turbo
# (this is currently required for annexes)
zinit light-mode for \
    zinit-zsh/z-a-rust \
    zinit-zsh/z-a-as-monitor \
    zinit-zsh/z-a-patch-dl \
    zinit-zsh/z-a-bin-gem-node

### End of Zinit's installer chunk

# # zsh
# zinit pack"5.4.2" for zsh

# p10k
zinit ice depth=1
zinit light romkatv/powerlevel10k

# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh

# fzf
zinit pack"binary+keys" for fzf

# exa, better ls
zinit ice wait"1ms" lucid from"gh-r" as"program" mv"exa* -> exa" atload"alias ls=exa; alias ll='ls -l'; alias la='ls -laFh'"
zinit light ogham/exa

# bat, better cat
zinit ice as"program" from"gh-r" mv"bat* -> bat" pick"bat/bat" atload"alias cat=bat"
zinit light sharkdp/bat

# fd, better find
zinit ice as"program" from"gh-r" mv"fd* -> fd" pick"fd/fd" atload"alias find=fd"
zinit light sharkdp/fd

# direnv
zinit ice from"gh-r" as"program" mv"direnv* -> direnv" atclone'./direnv hook zsh > zhook.zsh' atpull'%atclone' pick"direnv" src="zhook.zsh"
zinit light direnv/direnv

# enhancd, better cd
zinit ice wait lucid atload"export ENHANCD_COMPLETION_BEHAVIOR=history"
zinit light b4b4r07/enhancd

# gomi, better rm
zinit ice as"program" from"gh-r" pick"gomi" atload"alias rm=gomi"
zinit light b4b4r07/gomi

# jq
zinit ice from"gh-r" as"program" pick"jq-*" mv"jq-* -> jq"
zinit load stedolan/jq

# ripgrep
zinit ice from"gh-r" as"program" pick"ripgrep-*-linux-*" extract mv"*/rg -> rg"
zinit load BurntSushi/ripgrep

# git
zplugin ice as"program" pick"$ZPFX/bin/git-*" src"etc/git-extras-completion.zsh" make"PREFIX=$ZPFX"
zplugin light tj/git-extras

zinit ice wait lucid
zinit light wfxr/forgit

zinit ice as"program" pick"bin/git-dsf"
zinit light zdharma/zsh-diff-so-fancy

# zsh-autopair
zinit ice wait lucid
zinit load hlissner/zsh-autopair

# colors
zinit pack for ls_colors

# pyenv, virtual-env
zinit pack for pyenv
eval "$(pyenv virtualenv-init -)"

# asdf
zinit load asdf-vm/asdf

# history
zinit snippet OMZL::history.zsh

# k8s
zinit snippet OMZP::kubectl
zinit load unixorn/kubectx-zshplugin #NOTE:??no auto complete?

# editor
zstyle ':prezto:module:editor' key-bindings 'emacs'
zstyle ':prezto:module:editor' dot-expansion 'yes'
zinit snippet PZT::modules/editor
alias pbcopy='xsel --clipboard --input'
alias pbpaste='xsel --clipboard --output'
alias emacs='XLIB_SKIP_ARGB_VISUALS=1 LC_CTYPE=zh_CN.UTF-8 XMODIFIERS=@im=fcitx GTK_IM_MODULE=fcitx emacs'

# fzf-tab
zinit light Aloxaf/fzf-tab

# NOTE:
zinit load zsh-users/zsh-syntax-highlighting
zinit load zdharma/history-search-multi-word
zinit load zdharma/fast-syntax-highlighting

zinit wait lucid light-mode for \
      zsh-users/zsh-history-substring-search \
      atload"_zsh_autosuggest_start" zsh-users/zsh-autosuggestions \
      blockf atpull"zinit creinstall -q ." zsh-users/zsh-completions

bindkey -M emacs '^P' history-substring-search-up
bindkey -M emacs '^N' history-substring-search-down

autoload -Uz compinit
compinit
zinit cdreplay -q

# golang
export GOPATH=`asdf where golang`/packages/src
export PATH=$GOPATH/bin:$PATH
export PATH=`asdf where golang`/packages/bin:$PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant