zdharma-continuum / zinit

🌻 Flexible and fast ZSH plugin manager
MIT License
3k stars 127 forks source link

[bug]: zinit completion not working #128

Closed Orlinky closed 2 years ago

Orlinky commented 2 years ago

Issue description

Since the migration to the new project I had some problems with my zinit installation so I decided to make a clean install and updated my config file accordingly, everything was fine but I noticed that zinit's own completion is not working anymore.

I also tried it with a clean install but without adding my own .zshrc and it's still not working.

Instead of getting the habitual completion I get the default one suggesting folders.

It still is inside the git repository but it doesn't seem to work out of the box for me, maybe I am doing something wrong.

zinit config

# Zinit
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
source "${ZINIT_HOME}/zinit.zsh"

# Load all the auto-completions, has to be done before any compdefs.
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit

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

# Oh My Zsh libs & plugins
zinit wait lucid for \
    OMZL::completion.zsh \
    OMZL::git.zsh \
    OMZL::history.zsh \
    OMZP::colored-man-pages/colored-man-pages.plugin.zsh \
    OMZP::common-aliases/common-aliases.plugin.zsh \
    OMZP::docker-compose/docker-compose.plugin.zsh \
    OMZP::git/git.plugin.zsh \
    svn \
    OMZP::macos \
    OMZP::sudo/sudo.plugin.zsh \
    OMZP::vscode/vscode.plugin.zsh

# Other plugins
zinit wait lucid light-mode for \
        djui/alias-tips \
        zsh-users/zsh-history-substring-search \
        matthieusb/zsh-sdkman \
    atinit"ZINIT[COMPINIT_OPTS]=-C; zicompinit; zicdreplay" \
        Aloxaf/fzf-tab \
        zdharma-continuum/fast-syntax-highlighting \
    blockf \
        zsh-users/zsh-completions \
    atload"!_zsh_autosuggest_start" \
        zsh-users/zsh-autosuggestions

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

zinit version or commit ID

e8058a8c8d77bb2b1940658eec3cbd809603fcb7

zsh version

5.8

host info

macOS 12.0.1

pschmitt commented 2 years ago

You seem to be missing a zicompinit call in your zshrc if that's the entirety of it.

Orlinky commented 2 years ago

Thank you for your answer.

Indeed there wasn't a zicompinit call in my .zshrc but even when I add it zinit's completion is still not working.

Am I misunderstanding something? Because I thought that zinit did the compinit automatically? That's why I removed the call in my configuration a long time ago and everything was working fine.

alichtman commented 2 years ago

https://github.com/alichtman/dotfiles/blob/master/.config/zsh/.zshrc#L66-L67

I have zpcompinit, which may be a remnant from the zplugin days

Orlinky commented 2 years ago

https://github.com/alichtman/dotfiles/blob/master/.config/zsh/.zshrc#L66-L67

I have zpcompinit, which may be a remnant from the zplugin days

I do have a similar line in my .zshrc but it's still not working with my initial zicompinit nor the older zpcompinit.

Is there a way to "link" the completion file in the local git repository?

The weird thing is it doesn't work on my computer even with a fresh install, is this the case for you two?

Update: I tested on Linux(Debian) with the same config file and the completion works so I am not sure what is the problem on macOS.

vladdoster commented 2 years ago

Closing due to lack of activity.

@Orlinky -- Please re-open this issue or create a new one if you still experience this issue.