@vim-geek/coc-zshell
dorukozerrZsh completion support for coc.nvim using native zsh completion system
Published Package Summary
coc-zshell
Zsh completion support for coc.nvim using the native zsh completion system.
Install
vim -c ":CocInstall coc-zshell"
What it does
This extension provides zsh autocompletion directly in your Vim/Neovim buffers when editing zsh files. It leverages the native zsh completion system, including brew completions and any custom completion paths you've configured beside builtin completions.
Custom ZDOTDIR support
This extension respects custom zsh configuration directories. If you have a
custom ZDOTDIR set in your ~/.zshenv:
export ZDOTDIR="$HOME/.config/zsh"
The extension will correctly load your zsh configuration and all associated completions (tested on macOS).
Use with vi-mode in terminal
If you use vi-mode in your terminal, this extension becomes particularly
powerful. Add this to your .zshrc:
export KEYTIMEOUT=1
autoload -Uz add-zsh-hook
autoload -Uz edit-command-line
zle -N edit-command-line
bindkey -v
bindkey -M vicmd 'v' edit-command-line
bindkey '^A' beginning-of-line
bindkey '^E' end-of-line
function zle-keymap-select {
case ${KEYMAP} in
(vicmd) echo -ne '\e[1 q';;
(main|viins) echo -ne '\e[5 q';;
esac
}
zle -N zle-keymap-select
With this setup, press ESC in your terminal to enter normal mode (just like
in vim), then press v to open the current command line in a vim buffer. Edit
your zsh commands with full autocompletion support, save and close to execute.
Credits
This extension builds heavily on the excellent work from:
- coc-zsh by tjdevries
- vim-zsh-completion by Valodim
I've made minimal modifications to support brew completions and custom
ZDOTDIR configurations.
Contributing
Contributions, issues, and feedback are warmly welcomed! This extension has primarily been tested on macOS. If you're on Linux and encounter any issues (or if it works perfectly), please let me know.
Screenshots

License
MIT
- Zsh completion support for coc.nvim using native zsh completion system
- onLanguage:zsh
Want to build, test, or contribute to coc.nvim extensions? Explore our official SDK and testing toolkits.
Open Developer GuideVersion History
This published npm package does not include a history.md or changelog.md file. Browse its npm versions or repository releases for available release information.
Contributed Commands
All contributes.commands entries from the published package manifest for @vim-geek/coc-zshell@0.0.9.
This package does not declare any contributed commands.
Configuration Schema
All contributes.configuration entries from the published package manifest, including each raw property schema for coc-settings.json.
Raw JSON Schema
{
"type": "boolean",
"default": true,
"description": "Enable coc-zshell extension"
}Raw JSON Schema
{
"type": "number",
"default": 5000,
"description": "Timeout for completion requests in milliseconds"
}Raw JSON Schema
{
"type": "number",
"default": 95,
"description": "Priority for zsh source"
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"default": [
"-",
"$"
],
"description": "Trigger characters for zsh source"
}