Installation Guide
Manually install coc.nvim, verify Node.js and editor requirements, choose a runtimepath strategy, and troubleshoot advanced installation scenarios.
coc.nvim project documentation · Content sources and maintainers
Edit this pageQuick Script InstallRecommended
Uses the selected editor's native pack mechanism. Run again anytime to update.
Review what it runs before executing: view installer source.
curl -fsSL https://cocnvim.com/install-coc.sh | bash -s -- --editor=nvim
The script checks Node.js and Neovim, detects another coc.nvim installation, then shows every planned path before confirmation. It installs to ${XDG_DATA_HOME:-~/.local/share}/nvim/site/pack/coc/opt/coc.nvim and the Neovim init file and preserves an existing native-pack copy as .backup-*. It adds one idempotent packadd coc.nvim entry when the config does not already load coc.nvim. Use --no-config / -NoConfig to leave config unchanged.
coc.nvim is mostly written in TypeScript and runs on Node.js.
Requirements
neovim>=0.8.0orvim>=9.0.0438(run:versionorvim --versionto find your Vim version)node>=22.15.0
Install Node.js.
Note: coc.nvim finds node by calling executable('node') from within Vim. See
:h g:coc_node_path to customize the Node.js path.
Note: NixOS users must follow these steps:
- Install Node.js via
nix-envor put it in/etc/nixos/configuration.nix sudo nixos-rebuild switch
Add coc.nvim to vim's runtimepath
Using vim-plug
Use coc.nvim's release branch (recommended):
| 1 | Plug 'neoclide/coc.nvim', {'branch': 'release'} |
Build from source:
| 1 | Plug 'neoclide/coc.nvim', { 'branch': 'master', 'do': 'npm ci' } |
Run :PlugInstall in Vim or Neovim.
Using lazy.nvim
Use the release branch (recommended):
| 1 | { 'neoclide/coc.nvim', branch = 'release', } |
Using packer.nvim
Use the release branch (recommended):
| 1 | use {'neoclide/coc.nvim', branch = 'release'} |
Build from source:
| 1 | use {'neoclide/coc.nvim', branch = 'master', run = 'npm ci'} |
Run :PackerInstall in Neovim.
Using dein.vim
Use the release branch (recommended):
| 1 | call dein#add('neoclide/coc.nvim', { 'merged': 0, 'rev': 'release' }) |
Build from source:
| 1 | call dein#add('neoclide/coc.nvim', { 'merged': 0, 'rev': 'master', 'build': 'npm ci' }) |
Note: Without 'merged': 0, coc.nvim will not start.
Note: Depending on your network and CPU, the first build might take a while.
If you have trouble compiling from source when using dein, try these shell commands:
| 1 | cd ~/.cache/dein/repos/github.com/neoclide/coc.nvim |
| 2 | git clean -xfd |
| 3 | npm ci |
Using NeoBundle
Use the release branch:
| 1 | NeoBundle 'neoclide/coc.nvim', {'branch': 'release'} |
Using Paq
Use the release branch.
| 1 | {"neoclide/coc.nvim", branch="release"}; |
Using pathogen.vim
| 1 | cd ~/.vim/bundle |
| 2 | git clone -b release https://github.com/neoclide/coc.nvim |
Using vim8's native package manager
Get the source code from the release branch:
vim8:
| 1 | mkdir -p ~/.vim/pack/coc/start |
| 2 | cd ~/.vim/pack/coc/start |
| 3 | git clone --branch release https://github.com/neoclide/coc.nvim.git --depth=1 |
| 4 | vim -c "helptags coc.nvim/doc/ | q" |
neovim:
| 1 | mkdir -p ~/.local/share/nvim/site/pack/coc/start |
| 2 | cd ~/.local/share/nvim/site/pack/coc/start |
| 3 | git clone --branch release https://github.com/neoclide/coc.nvim.git --depth=1 |
| 4 | nvim -c "helptags coc.nvim/doc/ | q" |
Check service state
To check whether the coc.nvim service is running, run :checkhealth in Neovim (this command is not supported by Vim). The output looks like this:

Set the g:coc_node_path variable to specify the node executable used to start the coc.nvim service.
After the service starts, use :CocInfo to view information about it.
Install extensions for programming languages you use daily
For general web development, consider :CocInstall coc-tsserver coc-json coc-html coc-css.
For Python 3: :CocInstall coc-pyright
For PHP: :CocInstall coc-phpls
For more information, see Using coc extensions.
Add some configuration
Run :CocConfig to open the main configuration file, ~/.config/nvim/coc-settings.json (empty for a new installation). Start with an empty JSON object ({}), then configure any language servers not already provided by installed extensions. For example, if you have installed coc-pyright, you do not need to configure the pyls server.
For more information, see Using the configuration file.
<a id="install-watchman-for-file-watching"></a>
File watching (Watchman fallback)
coc.nvim includes a native file watcher, so you do not need to install Watchman for file change notifications such as workspace/didChangeWatchedFiles.
By default, coc.nvim tries the bundled native watcher first and looks for Watchman on $PATH only if it fails. If fileSystemWatch.watchmanPath is nonempty, that Watchman executable is tried first, followed by the native watcher.
Watchman is an optional fallback for systems where the native watcher is unavailable. To use it, follow the Watchman installation guide. See File system watch for platform limitations, configuration, and troubleshooting.